From a787da8a22713c804e7c8a95fccc2777ecba8ad3 Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Wed, 8 Apr 2026 23:01:01 +0200 Subject: [PATCH 1/4] Remove unused tests --- example/test/widget_test.dart | 12 ------------ test/sn_progress_dialog_test.dart | 5 ----- 2 files changed, 17 deletions(-) delete mode 100644 example/test/widget_test.dart delete mode 100644 test/sn_progress_dialog_test.dart diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart deleted file mode 100644 index ae40864..0000000 --- a/example/test/widget_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter_test/flutter_test.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async {}); -} diff --git a/test/sn_progress_dialog_test.dart b/test/sn_progress_dialog_test.dart deleted file mode 100644 index 76e3261..0000000 --- a/test/sn_progress_dialog_test.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -void main() { - test('sn_progress_dialog', () {}); -} From 4b38d8b3417d41fbe8be30b19fe204398c797a84 Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Wed, 8 Apr 2026 23:11:50 +0200 Subject: [PATCH 2/4] Update everything to latest standards --- .github/workflows/dart.yml | 2 +- analysis_options.yaml | 1 + example/analysis_options.yaml | 1 + .../Flutter/ephemeral/flutter_lldb_helper.py | 32 ++++ .../ios/Flutter/ephemeral/flutter_lldbinit | 5 + example/lib/main.dart | 132 ++++++++-------- example/pubspec.lock | 147 ++++-------------- example/pubspec.yaml | 3 +- lib/enums/progress_types.dart | 16 +- lib/progress_dialog.dart | 29 ++-- lib/sn_progress_dialog.dart | 10 +- pubspec.lock | 141 +++-------------- pubspec.yaml | 48 +----- 13 files changed, 186 insertions(+), 381 deletions(-) create mode 100644 analysis_options.yaml create mode 100644 example/analysis_options.yaml create mode 100644 example/ios/Flutter/ephemeral/flutter_lldb_helper.py create mode 100644 example/ios/Flutter/ephemeral/flutter_lldbinit diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 174667c..9957996 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -9,7 +9,7 @@ jobs: package-analysis: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: axel-op/dart-package-analyzer@v3 # set an id for the current step id: analysis diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..f9b3034 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml new file mode 100644 index 0000000..f9b3034 --- /dev/null +++ b/example/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/example/ios/Flutter/ephemeral/flutter_lldb_helper.py b/example/ios/Flutter/ephemeral/flutter_lldb_helper.py new file mode 100644 index 0000000..a88caf9 --- /dev/null +++ b/example/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# Generated file, do not edit. +# + +import lldb + +def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): + """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" + base = frame.register["x0"].GetValueAsAddress() + page_len = frame.register["x1"].GetValueAsUnsigned() + + # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the + # first page to see if handled it correctly. This makes diagnosing + # misconfiguration (e.g. missing breakpoint) easier. + data = bytearray(page_len) + data[0:8] = b'IHELPED!' + + error = lldb.SBError() + frame.GetThread().GetProcess().WriteMemory(base, data, error) + if not error.Success(): + print(f'Failed to write into {base}[+{page_len}]', error) + return + +def __lldb_init_module(debugger: lldb.SBDebugger, _): + target = debugger.GetDummyTarget() + # Caveat: must use BreakpointCreateByRegEx here and not + # BreakpointCreateByName. For some reasons callback function does not + # get carried over from dummy target for the later. + bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") + bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) + bp.SetAutoContinue(True) + print("-- LLDB integration loaded --") diff --git a/example/ios/Flutter/ephemeral/flutter_lldbinit b/example/ios/Flutter/ephemeral/flutter_lldbinit new file mode 100644 index 0000000..e3ba6fb --- /dev/null +++ b/example/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# Generated file, do not edit. +# + +command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/example/lib/main.dart b/example/lib/main.dart index 39c8219..8e54093 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -6,6 +6,8 @@ void main() { } class MyExample extends StatelessWidget { + const MyExample({Key? key}) : super(key: key); + @override Widget build(BuildContext context) { return MaterialApp( @@ -15,7 +17,9 @@ class MyExample extends StatelessWidget { } class Home extends StatelessWidget { - _normalProgress(context) async { + const Home({Key? key}) : super(key: key); + + Future _normalProgress(dynamic context) async { /// Create progress dialog ProgressDialog pd = ProgressDialog(context: context); @@ -40,13 +44,13 @@ class Home extends StatelessWidget { } /// Shows a progress dialog with a determinate progress bar. - _valuableProgress(context) async { + Future _valuableProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( max: 100, msg: 'File Downloading...', - progressType: ProgressType.valuable, + progressType: ProgressType.determinate, ); for (int i = 0; i <= 100; i++) { pd.update(value: i); @@ -57,7 +61,7 @@ class Home extends StatelessWidget { /// Shows a progress dialog that starts with a preparation message, /// then switches to a downloading message. - _preparingProgress(context) async { + Future _preparingProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( @@ -75,7 +79,7 @@ class Home extends StatelessWidget { } /// Shows a customizable progress dialog with a dark theme. - _customProgress(context) async { + Future _customProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( max: 100, @@ -95,7 +99,7 @@ class Home extends StatelessWidget { } /// Shows a progress dialog that completes with a custom completion widget. - _completedProgress(context) async { + Future _completedProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( max: 100, @@ -113,7 +117,7 @@ class Home extends StatelessWidget { } /// Shows a message-only progress dialog without a progress bar. - _onlyMessageProgress(context) async { + Future _onlyMessageProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( barrierDismissible: true, @@ -129,7 +133,7 @@ class Home extends StatelessWidget { } /// Shows a message-only progress dialog that completes automatically. - _onlyMessageWithCompletionProgress(context) async { + Future _onlyMessageWithCompletionProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( barrierDismissible: true, @@ -152,65 +156,63 @@ class Home extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: Container( - child: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(20.0), - child: Text( - 'Sn Progress Example', - style: TextStyle( - fontSize: 30.0, - fontWeight: FontWeight.bold, - ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.all(20.0), + child: Text( + 'Sn Progress Example', + style: TextStyle( + fontSize: 30.0, + fontWeight: FontWeight.bold, ), ), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Normal Progress'), - onPressed: () { - _normalProgress(context); - }), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Valuable Progress'), - onPressed: () { - _valuableProgress(context); - }), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Preparing Progress'), - onPressed: () { - _preparingProgress(context); - }), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Custom Progress'), - onPressed: () { - _customProgress(context); - }), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Completed Progress'), - onPressed: () { - _completedProgress(context); - }), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Message Progress'), - onPressed: () { - _onlyMessageProgress(context); - }), - MaterialButton( - color: Color(0xfff7f7f7), - child: Text('Message Progress With Completed'), - onPressed: () { - _onlyMessageWithCompletionProgress(context); - }), - ], - ), + ), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Normal Progress'), + onPressed: () { + _normalProgress(context); + }), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Valuable Progress'), + onPressed: () { + _valuableProgress(context); + }), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Preparing Progress'), + onPressed: () { + _preparingProgress(context); + }), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Custom Progress'), + onPressed: () { + _customProgress(context); + }), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Completed Progress'), + onPressed: () { + _completedProgress(context); + }), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Message Progress'), + onPressed: () { + _onlyMessageProgress(context); + }), + MaterialButton( + color: Color(0xfff7f7f7), + child: Text('Message Progress With Completed'), + onPressed: () { + _onlyMessageWithCompletionProgress(context); + }), + ], ), ), ); diff --git a/example/pubspec.lock b/example/pubspec.lock index 1cbf686..bde69bd 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,180 +1,87 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" + version: "1.4.1" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d - url: "https://pub.dev" - source: hosted - version: "1.0.6" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "41e005c33bd814be4d3096aff55b1908d419fde52ca656c8c47719ec745873cd" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.0.9" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_test: + flutter_lints: dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - matcher: + description: + name: flutter_lints + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" + url: "https://pub.dev" + source: hosted + version: "6.0.0" + lints: dependency: transitive description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + name: lints + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "6.1.0" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.13.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.10.0" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" + version: "1.17.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" sn_progress_dialog: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.2.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" + version: "2.0.0" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "2.2.0" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" - flutter: ">=1.17.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 4029696..0aac9f8 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -33,8 +33,7 @@ dependencies: cupertino_icons: ^1.0.0 dev_dependencies: - flutter_test: - sdk: flutter + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/lib/enums/progress_types.dart b/lib/enums/progress_types.dart index 9bd5c55..333cdfe 100644 --- a/lib/enums/progress_types.dart +++ b/lib/enums/progress_types.dart @@ -1,14 +1,4 @@ enum ProgressType { - /// Indeterminate progress indicator - @Deprecated( - 'Use indeterminate instead. This will be removed in the next major version.') - normal, - - /// Progress indicator with value - @Deprecated( - 'Use determinate instead. This will be removed in the next major version.') - valuable, - /// Shows an infinite spinning progress indicator without specific progress value indeterminate, @@ -17,9 +7,7 @@ enum ProgressType { } extension ProgressTypeHelper on ProgressType { - bool get isIndeterminate => - this == ProgressType.normal || this == ProgressType.indeterminate; + bool get isIndeterminate => this == ProgressType.indeterminate; - bool get isDeterminate => - this == ProgressType.valuable || this == ProgressType.determinate; + bool get isDeterminate => this == ProgressType.determinate; } diff --git a/lib/progress_dialog.dart b/lib/progress_dialog.dart index f72dc9a..406aa35 100644 --- a/lib/progress_dialog.dart +++ b/lib/progress_dialog.dart @@ -4,8 +4,8 @@ import 'package:flutter/material.dart'; import 'package:sn_progress_dialog/enums/dialog_status.dart'; import 'package:sn_progress_dialog/enums/progress_types.dart'; import 'package:sn_progress_dialog/enums/value_position.dart'; -import 'package:sn_progress_dialog/options/completed.dart'; import 'package:sn_progress_dialog/options/cancel.dart'; +import 'package:sn_progress_dialog/options/completed.dart'; /// A customizable progress dialog that displays loading states and completion messages. class ProgressDialog { @@ -22,23 +22,22 @@ class ProgressDialog { bool _dialogIsOpen = false; /// The build context used to show the dialog. - late BuildContext _context; + final BuildContext _context; /// Callback triggered when dialog status changes. ValueChanged? _onStatusChanged; /// Whether to show dialog in root navigator. /// If true, the dialog will be displayed above all other routes. - late bool _useRootNavigator; + final bool _useRootNavigator; /// Creates a progress dialog with the given build context. /// /// [context] - Required build context for showing the dialog /// [useRootNavigator] - Whether to show in root navigator. Defaults to true - ProgressDialog({required context, bool? useRootNavigator}) { - this._context = context; - this._useRootNavigator = useRootNavigator ?? true; - } + ProgressDialog({required BuildContext context, bool? useRootNavigator}) + : _context = context, + _useRootNavigator = useRootNavigator ?? true; /// Updates the dialog's progress value and message. /// @@ -90,7 +89,8 @@ class ProgressDialog { } /// Creates a progress indicator with deterministic value. - _valueProgress({Color? valueColor, Color? bgColor, required double value}) { + CircularProgressIndicator _valueProgress( + {Color? valueColor, Color? bgColor, required double value}) { return CircularProgressIndicator( backgroundColor: bgColor, valueColor: AlwaysStoppedAnimation(valueColor), @@ -99,7 +99,8 @@ class ProgressDialog { } /// Creates an indeterminate progress indicator. - _normalProgress({Color? valueColor, Color? bgColor}) { + CircularProgressIndicator _normalProgress( + {Color? valueColor, Color? bgColor}) { return CircularProgressIndicator( backgroundColor: bgColor, valueColor: AlwaysStoppedAnimation(valueColor), @@ -248,7 +249,7 @@ class ProgressDialog { package: "sn_progress_dialog", ), ) - : Container( + : SizedBox( width: 35.0, height: 35.0, child: progressType.isIndeterminate @@ -304,6 +305,9 @@ class ProgressDialog { ), hideValue == false ? Align( + alignment: valuePosition == ValuePosition.right + ? Alignment.bottomRight + : Alignment.bottomCenter, child: Text( value <= 0 ? '' : '${_progress.value}/$max', style: TextStyle( @@ -315,9 +319,6 @@ class ProgressDialog { : TextDecoration.none, ), ), - alignment: valuePosition == ValuePosition.right - ? Alignment.bottomRight - : Alignment.bottomCenter, ) : SizedBox.shrink() ], @@ -325,7 +326,7 @@ class ProgressDialog { }, ), ), - onPopInvoked: (didPop) { + onPopInvokedWithResult: (didPop, result) { if (didPop) { _dialogIsOpen = false; _setDialogStatus(DialogStatus.closed); diff --git a/lib/sn_progress_dialog.dart b/lib/sn_progress_dialog.dart index 4e09add..66c3e39 100644 --- a/lib/sn_progress_dialog.dart +++ b/lib/sn_progress_dialog.dart @@ -1,9 +1,9 @@ -library sn_progress_dialog; +library; /// Exporting package files -export 'progress_dialog.dart'; -export 'options/completed.dart'; -export 'options/cancel.dart'; -export 'enums/progress_types.dart'; export 'enums/dialog_status.dart'; +export 'enums/progress_types.dart'; export 'enums/value_position.dart'; +export 'options/cancel.dart'; +export 'options/completed.dart'; +export 'progress_dialog.dart'; diff --git a/pubspec.lock b/pubspec.lock index ccf74e7..c22b116 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,165 +1,72 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" - source: hosted - version: "2.1.1" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.3.0" - clock: - dependency: transitive - description: - name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" - source: hosted - version: "1.1.1" + version: "1.4.1" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.19.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_test: + flutter_lints: dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - matcher: + description: + name: flutter_lints + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" + url: "https://pub.dev" + source: hosted + version: "6.0.0" + lints: dependency: transitive description: - name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + name: lints + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "6.1.0" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.13.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" url: "https://pub.dev" source: hosted - version: "1.10.0" - path: - dependency: transitive - description: - name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" - source: hosted - version: "1.8.3" + version: "1.17.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" - url: "https://pub.dev" - source: hosted - version: "1.11.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" - url: "https://pub.dev" - source: hosted - version: "0.6.1" + version: "0.0.0" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "2.2.0" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" - flutter: ">=1.17.0" + dart: ">=3.9.0-0 <4.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index e695273..6854998 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,53 +1,15 @@ name: sn_progress_dialog description: Customizable progress dialog package for Flutter.(Captures the progress value) -version: 1.2.0 -homepage: https://github.com/emreesen27/Flutter-Progress-Dialog.git +version: 2.0.0 +homepage: https://github.com/emreesen27/Flutter-Progress-Dialog environment: - sdk: '>=2.12.0 <4.0.0' - flutter: ">=1.17.0" + sdk: '>=3.5.0 <4.0.0' + flutter: '>=3.0.0' dependencies: flutter: sdk: flutter dev_dependencies: - flutter_test: - sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - -# To add assets to your package, add an assets section, like this: - assets: - - images/completed.png - - images/cancel.png -# -# For details regarding assets in packages, see -# https://flutter.dev/assets-and-images/#from-packages -# -# An image asset can refer to one or more resolution-specific "variants", see -# https://flutter.dev/assets-and-images/#resolution-aware. - -# To add custom fonts to your package, add a fonts section here, -# in this "flutter" section. Each entry in this list should have a -# "family" key with the font family name, and a "fonts" key with a -# list giving the asset and other descriptors for the font. For -# example: -# fonts: -# - family: Schyler -# fonts: -# - asset: fonts/Schyler-Regular.ttf -# - asset: fonts/Schyler-Italic.ttf -# style: italic -# - family: Trajan Pro -# fonts: -# - asset: fonts/TrajanPro.ttf -# - asset: fonts/TrajanPro_Bold.ttf -# weight: 700 -# -# For details regarding fonts in packages, see -# https://flutter.dev/custom-fonts/#from-packages + flutter_lints: ^6.0.0 From cc5c375e9e8b78a4c62ed6e6ff7675f348e74a33 Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Wed, 8 Apr 2026 23:28:54 +0200 Subject: [PATCH 3/4] Remove a lot of default values This makes everything automatically conform with Material standards --- example/lib/main.dart | 4 ++-- lib/progress_dialog.dart | 38 +++++++++++++------------------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 8e54093..603f1ad 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -88,8 +88,8 @@ class Home extends StatelessWidget { backgroundColor: Color(0xff212121), progressValueColor: Color(0xff3550B4), progressBgColor: Colors.white70, - msgColor: Colors.white, - valueColor: Colors.white); + msgStyle: TextStyle(color: Colors.white), + valueStyle: TextStyle(color: Colors.white)); await Future.delayed(Duration(milliseconds: 3000)); for (int i = 0; i <= 100; i++) { pd.update(value: i, msg: 'File Downloading...'); diff --git a/lib/progress_dialog.dart b/lib/progress_dialog.dart index 406aa35..53c5e71 100644 --- a/lib/progress_dialog.dart +++ b/lib/progress_dialog.dart @@ -149,18 +149,14 @@ class ProgressDialog { Cancel? cancel, ProgressType progressType = ProgressType.indeterminate, ValuePosition valuePosition = ValuePosition.right, - Color backgroundColor = Colors.white, + Color? backgroundColor, Color? surfaceTintColor, - Color barrierColor = Colors.transparent, - Color progressValueColor = Colors.blueAccent, - Color progressBgColor = Colors.blueGrey, - Color valueColor = Colors.black87, - Color msgColor = Colors.black87, + Color? barrierColor, + Color? progressValueColor, + Color? progressBgColor, + TextStyle? valueStyle, + TextStyle? msgStyle, TextAlign msgTextAlign = TextAlign.center, - FontWeight msgFontWeight = FontWeight.bold, - FontWeight valueFontWeight = FontWeight.normal, - double valueFontSize = 15.0, - double msgFontSize = 17.0, int msgMaxLines = 1, double elevation = 5.0, double borderRadius = 15.0, @@ -289,11 +285,7 @@ class ProgressDialog { textAlign: msgTextAlign, maxLines: msgMaxLines, overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: msgFontSize, - color: msgColor, - fontWeight: msgFontWeight, - ), + style: msgStyle, ); }, ); @@ -309,16 +301,12 @@ class ProgressDialog { ? Alignment.bottomRight : Alignment.bottomCenter, child: Text( - value <= 0 ? '' : '${_progress.value}/$max', - style: TextStyle( - fontSize: valueFontSize, - color: valueColor, - fontWeight: valueFontWeight, - decoration: value == max - ? TextDecoration.lineThrough - : TextDecoration.none, - ), - ), + value <= 0 ? '' : '${_progress.value}/$max', + style: (valueStyle ?? TextStyle(inherit: true)) + .copyWith( + decoration: value == max + ? TextDecoration.lineThrough + : TextDecoration.none)), ) : SizedBox.shrink() ], From 497ba56179838e790d37bc2343b0585cde758d28 Mon Sep 17 00:00:00 2001 From: Emre Esen Date: Mon, 29 Jun 2026 13:36:29 +0300 Subject: [PATCH 4/4] v2.0.0 is completed --- CHANGELOG.md | 27 ++------ README.md | 4 +- example/.metadata | 24 ++++++- example/android/.gitignore | 5 +- example/android/app/build.gradle | 63 ------------------ example/android/app/build.gradle.kts | 44 ++++++++++++ .../android/app/src/debug/AndroidManifest.xml | 6 +- .../android/app/src/main/AndroidManifest.xml | 33 +++++---- .../com/snstudio/example/MainActivity.kt | 3 +- .../res/drawable-v21/launch_background.xml | 12 ++++ .../app/src/main/res/values-night/styles.xml | 18 +++++ .../app/src/main/res/values/styles.xml | 12 ++-- .../app/src/profile/AndroidManifest.xml | 6 +- example/android/build.gradle | 31 --------- example/android/build.gradle.kts | 24 +++++++ example/android/gradle.properties | 3 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- example/android/settings.gradle | 11 --- example/android/settings.gradle.kts | 26 ++++++++ example/lib/main.dart | 12 ++-- example/pubspec.lock | 12 ++-- images/cancel.png | Bin 345 -> 572 bytes lib/options/cancel.dart | 3 +- lib/progress_dialog.dart | 17 ++--- pubspec.lock | 14 ++-- pubspec.yaml | 5 ++ 26 files changed, 221 insertions(+), 197 deletions(-) delete mode 100644 example/android/app/build.gradle create mode 100644 example/android/app/build.gradle.kts create mode 100644 example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 example/android/app/src/main/res/values-night/styles.xml delete mode 100644 example/android/build.gradle create mode 100644 example/android/build.gradle.kts delete mode 100644 example/android/settings.gradle create mode 100644 example/android/settings.gradle.kts diff --git a/CHANGELOG.md b/CHANGELOG.md index 650fa62..d57d4b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,91 +1,78 @@ +## [2.0.0] - 29.06.2026 +* **BREAKING:** Removed deprecated `ProgressType` values `normal` and `valuable`. Use `indeterminate` and `determinate` instead. +* **BREAKING:** Replaced individual text styling parameters (font size, weight, color) with `valueStyle` and `msgStyle` `TextStyle` properties for cleaner and more flexible customization. Thanks to Nico Mexis. +* **BREAKING:** Color parameters are now nullable and fall back to theme defaults instead of hardcoded values. Thanks to Nico Mexis. +* Updated dependencies and modernized the project structure. Thanks to Nico Mexis. + ## [1.2.0]- 10.12.2024 * `completedMsgFuture` support for asynchronous completion messages * `dispose()` method to properly release resources * Deprecated old ProgressType values: normal and valuable - ## [1.1.4] - 09.03.2024 - * Added support for `useRootNavigator` parameter in the `ProgressDialog` constructor. * `WillPopScope` usage has been deprecated in favor of `PopScope` * `SurfaceTintColor` now customizable ## [1.1.3] - 08.02.2023 - * Issues 22 and 28 fix. * Readme edited. * Removed required fields in update method ## [1.1.2] - 22.01.2023 - * Auto hidden added. * Readme edited. ## [1.1.1] - 21.01.2023 - * Readme edited. ## [1.1.0] - 21.01.2023 - * Bug Fix. * Cancel option added. * Dialog status callback added. ## [1.0.9] - 09.12.2022 - * Assets path edited. * The close function can be used with delay. * closeWithDelay property added. ## [1.0.8] - 20.05.2022 - * Bug Fix. ## [1.0.7] - 01.05.2022 - * Bug Fix. ## [1.0.6] - 28.03.2022 - * Readme edited. * Completed type added. ## [1.0.3] - 15.08.2021 - * Bug fix ## [1.0.2] - 04.05.2021 - * The back button was prevented from closing the dialog. * Border radius added. ## [1.0.1] - 01.04.2021 - * Example edited. * Readme edited. ## [1.0.0] - 31.03.2021 - * Null Safety migrated. * Bug fix. ## [0.0.5] - 14.02.2021 - * New properties added. ## [0.0.4] - 29.01.2021 - * Progress Type added. * Documentation and example codes edited. ## [0.0.3] - 21.01.2021 - * Msg added to update method. ## [0.0.2] - 16.01.2021 - * Readme and description edited. ## [0.0.1] - 16.01.2021 - -* Initial build for flutter sn_progress_dialog package. +* Initial build for flutter sn_progress_dialog package. \ No newline at end of file diff --git a/README.md b/README.md index 05e7c90..48768c8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Progress dialog package for flutter You must add the library as a dependency to your project. ```yaml dependencies: - sn_progress_dialog: ^1.2.0 + sn_progress_dialog: ^2.0.0 ``` You should then run `flutter packages get` @@ -18,7 +18,7 @@ Now in your Dart code, you can use: import 'package:sn_progress_dialog/sn_progress_dialog.dart'; ``` - Normal Progress | Valuable Progress + Indeterminate Progress | Determinate Progress :-------------------------:|:-------------------------: ![](https://github.com/emreesen27/Flutter-Progress-Dialog/blob/assets/normal.gif?raw=true) | ![](https://github.com/emreesen27/Flutter-Progress-Dialog/blob/assets/valuable.gif?raw=true) diff --git a/example/.metadata b/example/.metadata index 182ccca..339cbce 100644 --- a/example/.metadata +++ b/example/.metadata @@ -4,7 +4,27 @@ # This file should be version controlled and should not be manually edited. version: - revision: 78910062997c3a836feee883712c241a5fd22983 - channel: stable + revision: "adc901062556672b4138e18a4dc62a4be8f4b3c2" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + - platform: android + create_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + base_revision: adc901062556672b4138e18a4dc62a4be8f4b3c2 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/example/android/.gitignore b/example/android/.gitignore index 0a741cb..be3943c 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -5,7 +5,10 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties +**/*.keystore +**/*.jks diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle deleted file mode 100644 index a44017b..0000000 --- a/example/android/app/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 31 - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.snstudio.example" - minSdkVersion flutter.minSdkVersion - targetSdkVersion 31 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/example/android/app/build.gradle.kts b/example/android/app/build.gradle.kts new file mode 100644 index 0000000..e66eb37 --- /dev/null +++ b/example/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.snstudio.example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.snstudio.example" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml index e59eecd..399f698 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 9273e3b..74a78b9 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,21 +1,16 @@ - - + - @@ -45,4 +31,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/example/android/app/src/main/kotlin/com/snstudio/example/MainActivity.kt b/example/android/app/src/main/kotlin/com/snstudio/example/MainActivity.kt index 9e4e3a3..85da115 100644 --- a/example/android/app/src/main/kotlin/com/snstudio/example/MainActivity.kt +++ b/example/android/app/src/main/kotlin/com/snstudio/example/MainActivity.kt @@ -2,5 +2,4 @@ package com.snstudio.example import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity : FlutterActivity() diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 1f83a33..cb1ef88 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -1,18 +1,18 @@ - - - diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml index e59eecd..399f698 100644 --- a/example/android/app/src/profile/AndroidManifest.xml +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -1,6 +1,6 @@ - - diff --git a/example/android/build.gradle b/example/android/build.gradle deleted file mode 100644 index 3e85880..0000000 --- a/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.5.20' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.4.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/example/android/build.gradle.kts b/example/android/build.gradle.kts new file mode 100644 index 0000000..dbee657 --- /dev/null +++ b/example/android/build.gradle.kts @@ -0,0 +1,24 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/example/android/gradle.properties b/example/android/gradle.properties index a673820..f018a61 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,4 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true -android.enableR8=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 6b66533..ac3b479 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle deleted file mode 100644 index 44e62bc..0000000 --- a/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/android/settings.gradle.kts b/example/android/settings.gradle.kts new file mode 100644 index 0000000..fb605bc --- /dev/null +++ b/example/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.9.1" apply false + id("org.jetbrains.kotlin.android") version "2.1.0" apply false +} + +include(":app") diff --git a/example/lib/main.dart b/example/lib/main.dart index 603f1ad..1e6a130 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -19,7 +19,7 @@ class MyExample extends StatelessWidget { class Home extends StatelessWidget { const Home({Key? key}) : super(key: key); - Future _normalProgress(dynamic context) async { + Future _indeterminateProgress(dynamic context) async { /// Create progress dialog ProgressDialog pd = ProgressDialog(context: context); @@ -44,7 +44,7 @@ class Home extends StatelessWidget { } /// Shows a progress dialog with a determinate progress bar. - Future _valuableProgress(dynamic context) async { + Future _determinateProgress(dynamic context) async { ProgressDialog pd = ProgressDialog(context: context); pd.show( @@ -172,15 +172,15 @@ class Home extends StatelessWidget { ), MaterialButton( color: Color(0xfff7f7f7), - child: Text('Normal Progress'), + child: Text('Indeterminate Progress'), onPressed: () { - _normalProgress(context); + _indeterminateProgress(context); }), MaterialButton( color: Color(0xfff7f7f7), - child: Text('Valuable Progress'), + child: Text('Determinate Progress'), onPressed: () { - _valuableProgress(context); + _determinateProgress(context); }), MaterialButton( color: Color(0xfff7f7f7), diff --git a/example/pubspec.lock b/example/pubspec.lock index bde69bd..7f1dcc7 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: characters - sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.0" collection: dependency: transitive description: @@ -50,18 +50,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.13.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.16.0" sky_engine: dependency: transitive description: flutter diff --git a/images/cancel.png b/images/cancel.png index 76a7887cdc073ae0e282445e3560be7fe18379bb..ebcaf6b0bf4bb08eed049218092784e8f342cb7c 100644 GIT binary patch literal 572 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4zl0AZa85pY67#JE_7#My5g&JNk zFq9fFFuY1&V6d9Oz#v{QXIG#NP=YDR+ueoXe|!I#{XiaPfk$L91EbYf5N4dtQ5Fsq zWH0gbb!C6WCd*-|{Y&`l6QIyDPZ!4!kK=DA8S*hYinQ$)P+t(R%AzSW_m0DRwl}gD zE^B<{TckS6_lwZQ8y%v(E)`teTaC|L@cgEK|K0beXV36wUUCSV`J_N|qmxPf^p%1I zf7Yzotb9ayaZTX|%gcsup9m?*h_oJNa(pq1|LU^^8mk2DmL=?)&J*YK@yO@0aOvbP0l+XkK>z~fm delta 316 zcmdnPa+AreGr-TCmrII^fq{Y7)59eQNK1e)2OE%lP;UDJNU;<kHh)HcC7mL?@repS$TV3MrU;* zw=!!~m~fKG(>YvQ8FU;h&I_MsY&oIEVD9gE>P$Qj-v`DUcAVbV@;sUT8!hp_U8N$p z?|HHJ>+Ot-8SR+br$ppV4w=NFcWj$hBKtD0Gc0$qJ2OuCPEq-g#N_MfDfBR>Uo1xT zgi5iDKW~h#hl+d4`CFCZIoD51%e$9@*uyrW{b zPsJBF2IZI8ewcQIb)I1zpRV~11=3.9.0-0 <4.0.0" + dart: ">=3.8.0 <4.0.0" flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6854998..2f0a9f7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,3 +13,8 @@ dependencies: dev_dependencies: flutter_lints: ^6.0.0 + +flutter: + assets: + - images/cancel.png + - images/completed.png