Skip to content

Commit

Permalink
Add cupertino loader
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavini-hexaunity authored Dec 21, 2024
1 parent 3dcffd5 commit 551ff94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/src/easy_loading.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ enum EasyLoadingIndicatorType {
ripple,
spinningCircle,
squareCircle,
cupertino,
}

/// loading status
Expand Down
7 changes: 7 additions & 0 deletions lib/src/widgets/indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:flutter/cupertino.dart';

import '../easy_loading.dart';
import '../theme.dart';
Expand Down Expand Up @@ -199,6 +200,12 @@ class _LoadingIndicatorState extends State<LoadingIndicator> {
size: _size,
);
break;
case EasyLoadingIndicatorType.cupertino:
_indicator = CupertinoActivityIndicator(
color: _indicatorColor,
radius: _size,
);
break;
default:
_indicator = SpinKitFadingCircle(
color: _indicatorColor,
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
sdk: flutter

flutter_spinkit: ^5.1.0
cupertino_icons: ^1.0.8

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 551ff94

Please sign in to comment.