Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cupertino loader #240

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: flutter_easyloading
description: A clean and lightweight loading/toast widget for Flutter, Easy to use without context, Support iOS、Android and Web
description: Easy loading without context
version: 3.0.5
homepage: https://github.com/nslogx/flutter_easyloading

Expand All @@ -11,6 +11,7 @@ dependencies:
sdk: flutter

flutter_spinkit: ^5.1.0
cupertino_icons: ^1.0.8

dev_dependencies:
flutter_test:
Expand Down