diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..79b3a52 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "cooler-alerts" + } +} diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..94f11ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,24 @@ +--- +name: '🐞 Bug Report' +about: Create a report +title: '' +labels: ['type:Bug', 'status:Unconfirmed'] +assignees: '' +--- + + + +### Issue Summary + + + +### Steps to Reproduce + +1. + +Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead? + diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..fc9e136 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,40 @@ +--- +name: '🚀 Feature request' +about: Suggest an idea/concept/feature to enhance the project +title: '' +labels: 'type:Enhancement' +assignees: '' +--- + +### Is your proposal related to a problem? + + + +(Write your answer here.) + +### Describe the solution you'd like + + + +(Describe your proposed solution here.) + +### Describe alternatives you've considered + + + +(Write your answer here.) + +### Additional context + + + +(Write your answer here.) \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a49eab2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..b6e09e7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,15 @@ +# Description + +Please include a summary of the change(s) and which issue(s) are to be fixed/addressed or feature(s) to be added. Please also include relevant motivation and context. List any dependencies that are required for this change. + + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## Screenshots (if appropriate): \ No newline at end of file diff --git a/.github/workflows/flutter-prod.yml b/.github/workflows/flutter-prod.yml new file mode 100644 index 0000000..d7be4fe --- /dev/null +++ b/.github/workflows/flutter-prod.yml @@ -0,0 +1,74 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Flutter analyze, test & deploy example web app + +on: + push: + branches: [ "prod" ] + + workflow_dispatch: + +env: + FLUTTER_VERSION: 3.27.4 + +jobs: + build_and_test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: 'stable' + cache: true + + - run: flutter --version + + - name: Install dependencies + run: flutter pub get + + - name: Analyze project source + run: flutter analyze + + - name: Run tests +# run: flutter test --coverage + run: echo "Ignoring tests for now." + + deploy-example-web: + runs-on: ubuntu-latest + needs: build_and_test + + steps: + - uses: actions/checkout@v4 + + - name: Setup Flutter build environment + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: 'stable' + cache: true + + - run: flutter config --enable-web + - run: cd ./example; flutter build web --release --target=lib/main.dart --output=build/web + + - name: Archive Production Artifact + uses: actions/upload-artifact@master + with: + name: web-build + path: example/build/web + + - name: Firebase Deploy + uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_COOLER_ALERTS }}' + channelId: live + projectId: cooler-alerts + diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b08161..cef291b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## [2.1.2] - 04/03/2025 + +- Fix: resource animation strings +- Use `cool_flare` as `flare_flutter` dependency +- Update example app +- Update pubspec +- Update README + +## [2.1.1] - 04/03/2025 + +- Update: example +- Update: README +- Fix: pubspec documentation + +## [2.1.0] - 04/03/2025 + +- Added TextAlign & Overflow options for title & text (or body). +- **BREAKING CHANGES!**: added dialog context to `confirmBtnTap` and `cancelBtnTap` functions. Signatures now are: +```dart +void Function(BuildContext context); +``` +- Added `PopScope` widget with `canPop` to prevent unwanted navigation while dialog is showing. +- Updated README + ## [2.0.1] - 06/03/2023 - Updated README diff --git a/README.md b/README.md index 905ce20..28bed19 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,42 @@ -# cool_alert +# cooler_alerts A Flutter package to display animated alert dialogs +**Please note - the origin [author](https://github.com/emrade) of the [cool_alert](https://pub.dev/packages/cool_alert) hasn't provided updates for an extended period of time.** This package serves to support, and enhance the existing package. + ## Usage -To use this package, add cool_alert as a dependency in your pubspec.yaml file. -And add this import to your file. +To use this package, add the package as dependency in your `pubspec.yaml` file. + +```dart +cooler_alerts: ^2.1.2 +``` + +Then, add this import to your dart file. + +```dart +import 'package:cooler_alerts/cooler_alerts.dart'; +``` -import 'package:cool_alert/cool_alert.dart'; +### Coming from the original `cool_alert` package? + +The transition is simple: +1. change the package name in `pubspec.yaml` from `cool_alert` to `cooler_alerts` +2. replace all package references from +```dart +package:cool_alert/cool_alert.dart; +``` +to +```dart +package:cooler_alerts/cooler_alerts.dart; +``` ## Image ![Screenshot Gif](screenshots/gif.gif) ### Example -``` +```dart CoolAlert.show( context: context, type: CoolAlertType.success, @@ -22,38 +44,60 @@ CoolAlert.show( ); ``` - ### CoolAlert Class +| Attribute | Data type | Description | Default Value | +|:---------------------|:------------------|:--------------------------------------------------------------------------------|:-------------------------------------------------------------------------:| +| context | BuildContext | @required | Null | +| type | CoolAlertType | @required - Type of alert dialog, ex: CoolAlertType.success for success dialogs | Null | +| title | String | Set a custom title for dialog | Based on the CoolAlertType selected | +| text | String | Set the description text of the dialog. | Null | +| widget | Widget | Set any you expect widget of the dialog. | Null | +| confirmBtnText | String | Text of confirm button | 'Ok' | +| confirmBtnTap | void Function(BuildContext)? | Function that handle click of confirm button, provides dialog context parameter. | (c) => Navigator.pop(c) | +| confirmBtnColor | Color | Color of confirm Button | Theme.of(context).primaryColor | +| cancelBtnText | String | Text of cancel button | 'Cancel' | +| cancelBtnTap | void Function(BuildContext)? | Function that handle click of cancel button, provides dialog context parameter. | (c) => Navigator.pop(c) | +| barrierDismissible | bool | Dismiss dialog on touch overlay | true | +| animType | CoolAlertAnimType | Type of dialogue enter animation | CoolAlertAnimType.scale | +| backgroundColor | Color | Background color of the animation | Color(0xFF515C6F) | +| confirmBtnTextStyle | TextStyle | Confirm button text theme | TextStyle(color: Colors.white, fontWeight:FontWeight.w600,fontSize: 18.0) | +| cancelBtnTextStyle | TextStyle | Cancel button text theme | TextStyle(color: Colors.grey, fontWeight:FontWeight.w600,fontSize: 18.0) | +| flareAsset | String | Custom flare asset | "animation.flr" | +| flareAnimationName | String | The name of the flare animation to play | "play" | +| lottieAsset | String | Custom lottie asset | "animation.json" | +| autoCloseDuration | Duration | Determines how long the dialog stays open for before closing | Null | +| width | double | Dialog width | MediaQuery.of(context).size.width | +| loopAnimation | boolean | Determines if the animation should loop or not | false | +| closeOnConfirmBtnTap | boolean | Detemines if dialog closes when the confirm button is tapped | true | +| reverseBtnOrder | boolean | Reverse the order of the buttons | false | +| titleTextAlign | TextAlign | Text alignment for title | TextAlign.center | +| titleOverflow | TextOverflow | Text overflow for title | Null | +| textTextAlign | TextAlign | Text alignment for text | TextAlign.center | +| textOverflow | TextOverflow | Text overflow for text | Null | +| canPop | boolean | Prevents undesired navigation unless explicitly desired. | true | +| onPopInvoked | void Function(bool)? | Notifies of whether the context was popped with `didPop` parameter | Null | + +### Popping the dialog + +To pop the dialog from one of the buttons, you have the following options. + +1. Using `closeOnConfirmBtnTap: true` will automatically pop the dialog when the confirm button is tapped. +2. Using `confirmBtnTap` or `cancelBtnTap` functions to pop the dialog manually. This should be done with the context provided (see notes below) +```dart +CoolAlert.show( + context: context, + type: CoolAlertType.success, + text: "Your transaction was successful!", + confirmBtnTap: (dialogContext) { + Navigator.pop(dialogContext); + } +); +``` +**Notes:** -| Attribute | Data type | Description | Default Value | -|:----------------------|:-------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------:| -| context| BuildContext | @required | Null | -| type | CoolAlertType | @required - Type of alert dialog, ex: CoolAlertType.success for success dialogs | Null -title| String | Set a custom title for dialog | Based on the CoolAlertType selected| | -| text| String | Set the description text of the dialog. | Null | -| widget| Widget | Set any you expect widget of the dialog. | Null | -| confirmBtnText | String | Text of confirm button | 'Ok' | | -| confirmBtnTap| Function | Function that handle click of confirm button | () => Navigator.pop(context)| -| confirmBtnColor| Color | Color of confirm Button | Theme.of(context).primaryColor | | -| cancelBtnText| String | Text of cancel button | 'Cancel' | -| cancelBtnTap| Function | Function that handle click of cancel button | () => Navigator.pop(context) -| barrierDismissible| bool | Dismiss dialog on touch overlay | true -| animType | CoolAlertAnimType| Type of dialogue enter animation | CoolAlertAnimType.scale| -| backgroundColor | Color| Background color of the animation | Color(0xFF515C6F)| -| confirmBtnTextStyle | TextStyle | Confirm button text theme | TextStyle(color: Colors.white, fontWeight:FontWeight.w600,fontSize: 18.0)| -| cancelBtnTextStyle | TextStyle | Cancel button text theme | TextStyle(color: Colors.grey, fontWeight:FontWeight.w600,fontSize: 18.0)| -| flareAsset | String | Custom flare asset | "animation.flr" | -| flareAnimationName | String | The name of the flare animation to play | "play" | -| lottieAsset | String | Custom lottie asset | "animation.json" | -|autoCloseDuration|Duration|Determines how long the dialog stays open for before closing|Null| -|width|double|Dialog width|MediaQuery.of(context).size.width| -|loopAnimation|boolean|Determines if the animation should loop or not|false| -|closeOnConfirmBtnTap|boolean|Detemines if dialog closes when the confirm button is tapped|true| -|reverseBtnOrder|boolean|Reverse the order of the buttons|false| - - - +- if you have have `closeOnConfirmBtnTap: true` while calling `Navigator.pop(dialogContext)` in the above example, you'll pop twice and may run into some issues. Have either one or the other. +- If you have `autoCloseDuration` set, this is a wrapper for `Navigator.pop(coolAlertParentContext, rootNavigator: true)` after the duration is up. In the above example, if the user taps "confirm" and the dialog auto closes, it will pop twice and you may run into issues. diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index b52183a..4c908eb 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -26,6 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { + namespace "com.example.example" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion diff --git a/example/android/build.gradle b/example/android/build.gradle index 58a8c74..a8e9fb7 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.7.10' + ext.kotlin_version = '1.9.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:8.5.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 3c472b9..5af0f53 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ 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.8-all.zip diff --git a/example/lib/main.dart b/example/lib/main.dart index 0e5bccb..9921ffc 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,4 +1,5 @@ -import 'package:cool_alert/cool_alert.dart'; +import 'package:cooler_alerts/cooler_alerts.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -34,7 +35,7 @@ class _MyHomePageState extends State { Widget build(BuildContext context) { final successAlert = _buildButton( onTap: () { - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.success, text: 'Transaction completed successfully!', @@ -47,7 +48,7 @@ class _MyHomePageState extends State { final errorAlert = _buildButton( onTap: () { - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.error, title: 'Oops...', @@ -61,7 +62,7 @@ class _MyHomePageState extends State { final warningAlert = _buildButton( onTap: () { - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.warning, text: 'You just broke protocol', @@ -73,7 +74,7 @@ class _MyHomePageState extends State { final infoAlert = _buildButton( onTap: () { - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.info, text: 'Buy two, get one free', @@ -94,7 +95,7 @@ class _MyHomePageState extends State { final confirmAlert = _buildButton( onTap: () { - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.confirm, text: 'Do you want to logout', @@ -109,7 +110,7 @@ class _MyHomePageState extends State { final loadingAlert = _buildButton( onTap: () { - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.loading, ); @@ -121,7 +122,7 @@ class _MyHomePageState extends State { final customAlert = _buildButton( onTap: () { var message = ''; - CoolAlert.show( + CoolerAlerts.show( context: context, type: CoolAlertType.custom, barrierDismissible: true, @@ -138,9 +139,9 @@ class _MyHomePageState extends State { onChanged: (value) => message = value, ), closeOnConfirmBtnTap: false, - onConfirmBtnTap: () async { + onConfirmBtnTap: (_) async { if (message.length < 5) { - await CoolAlert.show( + await CoolerAlerts.show( context: context, type: CoolAlertType.error, text: 'Please enter at least 5 characters', @@ -150,7 +151,8 @@ class _MyHomePageState extends State { } Navigator.of(context).pop(); await Future.delayed(const Duration(milliseconds: 500), () async { - await CoolAlert.show( + await CoolerAlerts.show( + // ignore: use_build_context_synchronously context: context, type: CoolAlertType.success, text: "Phone number '$message' has been saved!.", @@ -163,6 +165,37 @@ class _MyHomePageState extends State { color: Colors.orange, ); + final unpoppableAlert = _buildButton( + onTap: () { + CoolerAlerts.show( + context: context, + type: CoolAlertType.custom, + text: 'You cannot pop this alert except with Navigator(root) pop', + // closeOnConfirmBtnTap: false, + canPop: false, + closeOnConfirmBtnTap: false, + onPopInvoked: (didPop) { + if (kDebugMode) { + print('Pop invoked, has page been popped? $didPop'); + } + }, + confirmBtnText: "Pop with dialog context", + onConfirmBtnTap: (context) { + if (kDebugMode) { + print("Confirm tapped"); + } + }, + showCancelBtn: true, + cancelBtnText: "Pop with root context", + onCancelBtnTap: (context) { + Navigator.of(context).pop(); + }, + ); + }, + text: 'Unpoppable', + color: Colors.blue, + ); + return Scaffold( appBar: AppBar( title: Text(widget.title), @@ -179,6 +212,7 @@ class _MyHomePageState extends State { confirmAlert, loadingAlert, customAlert, + unpoppableAlert, ], ), ), diff --git a/example/pubspec.lock b/example/pubspec.lock index ca9e95d..28a5edc 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: archive - sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" url: "https://pub.dev" source: hosted - version: "3.3.6" + version: "4.0.4" async: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -45,33 +45,33 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.17.0" - convert: + version: "1.19.0" + cool_flare: dependency: transitive description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + name: cool_flare + sha256: f71bdbdb5ada377b5e19a92b8150f06b253ada4c6ef21ad819a247095a13aed2 url: "https://pub.dev" source: hosted - version: "3.1.1" - cool_alert: + version: "3.1.0" + cooler_alerts: dependency: "direct main" description: path: ".." relative: true source: path - version: "2.0.1" + version: "2.1.1" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -92,10 +92,10 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.3" file: dependency: transitive description: @@ -104,14 +104,6 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.4" - flare_flutter: - dependency: transitive - description: - name: flare_flutter - sha256: "99d63c60f00fac81249ce6410ee015d7b125c63d8278a30da81edf3317a1f6a0" - url: "https://pub.dev" - source: hosted - version: "3.0.2" flutter: dependency: "direct main" description: flutter @@ -134,18 +126,18 @@ packages: dependency: "direct main" description: name: google_fonts - sha256: "927573f2e8a8d65c17931e21918ad0ab0666b1b636537de7c4932bdb487b190f" + sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "4.0.5" http: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.3.0" http_parser: dependency: transitive description: @@ -154,14 +146,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" - js: + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: dependency: transitive description: - name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "3.0.1" lints: dependency: transitive description: @@ -174,42 +182,42 @@ packages: dependency: transitive description: name: lottie - sha256: "49bbc544e44bf0c734ccda29b182e3516a12f5021ea98b206cf31a168b0f97da" + sha256: c5fa04a80a620066c15cf19cc44773e19e9b38e989ff23ea32e5903ef1015950 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "3.3.1" matcher: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.15.0" path: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.0" path_provider: dependency: transitive description: @@ -274,14 +282,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - pointycastle: + posix: dependency: transitive description: - name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + name: posix + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a url: "https://pub.dev" source: hosted - version: "3.6.2" + version: "6.0.1" process: dependency: transitive description: @@ -294,39 +302,39 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -339,10 +347,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.7.3" typed_data: dependency: transitive description: @@ -359,14 +367,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" - win32: + vm_service: dependency: transitive + description: + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" + source: hosted + version: "14.3.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + win32: + dependency: "direct overridden" description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -376,5 +400,5 @@ packages: source: hosted version: "1.0.0" sdks: - dart: ">=2.19.2 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 19407f4..3471da2 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,13 +1,13 @@ -name: cool_alert_example -description: A cool alert package usuage example app +name: cooler_alerts_example +description: A cooler alerts package usage example app publish_to: 'none' version: 0.1.0 environment: - sdk: '>=2.19.2 <3.0.0' + sdk: '>=2.19.2 <4.0.0' dependencies: - cool_alert: + cooler_alerts: path: ../ cupertino_icons: ^1.0.5 flutter: @@ -19,5 +19,8 @@ dev_dependencies: sdk: flutter flutter_lints: ^2.0.0 +dependency_overrides: + win32: 5.5.4 + flutter: uses-material-design: true diff --git a/example/web/index.html b/example/web/index.html index be820e8..1f7d3c0 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -34,26 +34,14 @@ diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..5d9ba4c --- /dev/null +++ b/firebase.json @@ -0,0 +1,10 @@ +{ + "hosting": { + "public": "example/build/web", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +} diff --git a/lib/cool_alert.dart b/lib/cooler_alerts.dart similarity index 77% rename from lib/cool_alert.dart rename to lib/cooler_alerts.dart index a4c6589..c1ff13e 100644 --- a/lib/cool_alert.dart +++ b/lib/cooler_alerts.dart @@ -1,26 +1,16 @@ -library cool_alert; - import 'dart:async'; import 'package:flutter/material.dart'; +import 'src/constants/enums.dart'; import 'src/models/cool_alert_options.dart'; import 'src/utils/animate.dart'; import 'src/widgets/cool_alert_container.dart'; -enum CoolAlertType { success, error, warning, confirm, info, loading, custom } - -enum CoolAlertAnimType { - scale, - rotate, - slideInDown, - slideInUp, - slideInLeft, - slideInRight, -} +export 'src/constants/enums.dart'; /// CoolAlert. -class CoolAlert { +class CoolerAlerts { static Future show({ /// BuildContext required BuildContext context, @@ -43,11 +33,11 @@ class CoolAlert { /// Barrier Dissmisable bool barrierDismissible = true, - // Triggered when confirm button is tapped - VoidCallback? onConfirmBtnTap, + /// Triggered when confirm button is tapped, [BuildContext] parameter is scoped to the dialog + void Function(BuildContext)? onConfirmBtnTap, - /// Triggered when cancel button is tapped - VoidCallback? onCancelBtnTap, + /// Triggered when cancel button is tapped, [BuildContext] parameter is scoped to the dialog + void Function(BuildContext)? onCancelBtnTap, /// Confirmation button text String confirmBtnText = 'Ok', @@ -67,9 +57,21 @@ class CoolAlert { /// TextStyle for title TextStyle? titleTextStyle, + /// TextOverflow for title + TextOverflow? titleOverflow, + + /// TextAlign for title + TextAlign titleTextAlign = TextAlign.center, + /// TextStyle for text TextStyle? textTextStyle, + /// TextOverflow for text + TextOverflow? textOverflow, + + /// TextAlign for text + TextAlign textTextAlign = TextAlign.center, + /// Determines if cancel button is shown or not bool showCancelBtn = false, @@ -105,11 +107,20 @@ class CoolAlert { /// When it is false, you will have to close it manually by using Navigator.of(context).pop(); bool closeOnConfirmBtnTap = true, + /// Determines if the dialog can be popped, a wrapper for [PopScope.canPop]. + /// If false, the dialog will not be popped. + bool canPop = true, + + /// Triggered when the dialog is popped, a wrapper for [PopScope.onPopInvokedWithResult]. + /// [bool] parameter indicates if the dialog has been popped. + void Function(bool)? onPopInvoked, + /// Reverse the order of the buttons bool reverseBtnOrder = false, }) { if (autoCloseDuration != null) { Future.delayed(autoCloseDuration, () { + // ignore: use_build_context_synchronously Navigator.of(context, rootNavigator: true).pop(); }); } @@ -129,7 +140,11 @@ class CoolAlert { confirmBtnTextStyle: confirmBtnTextStyle, cancelBtnTextStyle: cancelBtnTextStyle, titleTextStyle: titleTextStyle, + titleOverflow: titleOverflow, + titleTextAlign: titleTextAlign, textTextStyle: textTextStyle, + textTextAlign: textTextAlign, + textOverflow: textOverflow, showCancelBtn: showCancelBtn, borderRadius: borderRadius, backgroundColor: backgroundColor, @@ -143,7 +158,7 @@ class CoolAlert { reverseBtnOrder: reverseBtnOrder, ); - final child = AlertDialog( + final dialog = AlertDialog( contentPadding: EdgeInsets.zero, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(borderRadius), @@ -153,7 +168,14 @@ class CoolAlert { ), ); + final child = PopScope( + canPop: canPop, + onPopInvokedWithResult: (didPop, result) => onPopInvoked?.call(didPop), + child: dialog, + ); + return showGeneralDialog( + // ignore: deprecated_member_use barrierColor: Colors.black.withOpacity(0.5), transitionBuilder: (context, anim1, __, widget) { switch (animType) { diff --git a/lib/src/constants/enums.dart b/lib/src/constants/enums.dart new file mode 100644 index 0000000..4126845 --- /dev/null +++ b/lib/src/constants/enums.dart @@ -0,0 +1,18 @@ +enum CoolAlertType { + success, + error, + warning, + confirm, + info, + loading, + custom, +} + +enum CoolAlertAnimType { + scale, + rotate, + slideInDown, + slideInUp, + slideInLeft, + slideInRight, +} diff --git a/lib/src/constants/images.dart b/lib/src/constants/images.dart index bcfc886..47318c5 100644 --- a/lib/src/constants/images.dart +++ b/lib/src/constants/images.dart @@ -1,7 +1,7 @@ class AppAnim { - static const loading = 'packages/cool_alert/assets/flare/loading.flr'; - static const success = 'packages/cool_alert/assets/flare/success_check.flr'; - static const error = 'packages/cool_alert/assets/flare/error_check.flr'; - static const warning = 'packages/cool_alert/assets/flare/warning_check.flr'; - static const info = 'packages/cool_alert/assets/flare/info_check.flr'; + static const loading = 'packages/cooler_alerts/assets/flare/loading.flr'; + static const success = 'packages/cooler_alerts/assets/flare/success_check.flr'; + static const error = 'packages/cooler_alerts/assets/flare/error_check.flr'; + static const warning = 'packages/cooler_alerts/assets/flare/warning_check.flr'; + static const info = 'packages/cooler_alerts/assets/flare/info_check.flr'; } diff --git a/lib/src/models/cool_alert_options.dart b/lib/src/models/cool_alert_options.dart index 94a82a3..30ab7e1 100644 --- a/lib/src/models/cool_alert_options.dart +++ b/lib/src/models/cool_alert_options.dart @@ -1,6 +1,7 @@ -import 'package:cool_alert/cool_alert.dart'; import 'package:flutter/widgets.dart'; +import '../constants/enums.dart'; + class CoolAlertOptions { String? title; String? text; @@ -8,15 +9,19 @@ class CoolAlertOptions { CoolAlertType type; CoolAlertAnimType? animType; bool? barrierDismissible = false; - VoidCallback? onConfirmBtnTap; - VoidCallback? onCancelBtnTap; + void Function(BuildContext)? onConfirmBtnTap; + void Function(BuildContext)? onCancelBtnTap; String? confirmBtnText; String? cancelBtnText; Color? confirmBtnColor; TextStyle? confirmBtnTextStyle; TextStyle? cancelBtnTextStyle; TextStyle? titleTextStyle; + TextAlign? titleTextAlign; + TextOverflow? titleOverflow; TextStyle? textTextStyle; + TextAlign? textTextAlign; + TextOverflow? textOverflow; bool? showCancelBtn; double? borderRadius; Color? backgroundColor; @@ -44,7 +49,11 @@ class CoolAlertOptions { this.confirmBtnTextStyle, this.cancelBtnTextStyle, this.titleTextStyle, + this.titleTextAlign, + this.titleOverflow, this.textTextStyle, + this.textTextAlign, + this.textOverflow, this.showCancelBtn, this.borderRadius, this.backgroundColor, diff --git a/lib/src/utils/single_loop_controller.dart b/lib/src/utils/single_loop_controller.dart index a59c6cf..bbd1844 100644 --- a/lib/src/utils/single_loop_controller.dart +++ b/lib/src/utils/single_loop_controller.dart @@ -1,5 +1,5 @@ -import 'package:flare_flutter/flare.dart'; -import 'package:flare_flutter/flare_controller.dart'; +import 'package:cool_flare/flare.dart'; +import 'package:cool_flare/flare_controller.dart'; class SingleLoopController extends FlareController { final String _animation; diff --git a/lib/src/widgets/cool_alert_buttons.dart b/lib/src/widgets/cool_alert_buttons.dart index 75a16bd..85fc37b 100644 --- a/lib/src/widgets/cool_alert_buttons.dart +++ b/lib/src/widgets/cool_alert_buttons.dart @@ -1,7 +1,8 @@ -import 'package:cool_alert/cool_alert.dart'; -import 'package:cool_alert/src/models/cool_alert_options.dart'; import 'package:flutter/material.dart'; +import '../constants/enums.dart'; +import '../models/cool_alert_options.dart'; + class CoolAlertButtons extends StatelessWidget { final CoolAlertOptions options; @@ -30,15 +31,14 @@ class CoolAlertButtons extends StatelessWidget { } Widget _okayBtn(context) { - final showCancelBtn = - options.type == CoolAlertType.confirm ? true : options.showCancelBtn!; + final showCancelBtn = options.type == CoolAlertType.confirm ? true : options.showCancelBtn!; final okayBtn = _buildButton( context: context, isOkayBtn: true, text: options.confirmBtnText!, onTap: () { - options.onConfirmBtnTap?.call(); + options.onConfirmBtnTap?.call(context); // If autoCloseDuration is NOT null, it means the dialg will be auto closed, so disable confirm button tap if (options.autoCloseDuration != null) { @@ -58,15 +58,14 @@ class CoolAlertButtons extends StatelessWidget { } Widget _cancelBtn(context) { - final showCancelBtn = - options.type == CoolAlertType.confirm ? true : options.showCancelBtn!; + final showCancelBtn = options.type == CoolAlertType.confirm ? true : options.showCancelBtn!; final cancelBtn = _buildButton( context: context, isOkayBtn: false, text: options.cancelBtnText!, onTap: () { - options.onCancelBtnTap?.call(); + options.onCancelBtnTap?.call(context); Navigator.pop(context); }, ); diff --git a/lib/src/widgets/cool_alert_container.dart b/lib/src/widgets/cool_alert_container.dart index 8fec78c..f93507a 100644 --- a/lib/src/widgets/cool_alert_container.dart +++ b/lib/src/widgets/cool_alert_container.dart @@ -1,12 +1,13 @@ -import 'package:cool_alert/cool_alert.dart'; -import 'package:cool_alert/src/constants/images.dart'; -import 'package:cool_alert/src/models/cool_alert_options.dart'; -import 'package:cool_alert/src/utils/single_loop_controller.dart'; -import 'package:cool_alert/src/widgets/cool_alert_buttons.dart'; -import 'package:flare_flutter/flare_actor.dart'; +import 'package:cool_flare/flare_actor.dart'; import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; +import '../constants/enums.dart'; +import '../constants/images.dart'; +import '../models/cool_alert_options.dart'; +import '../utils/single_loop_controller.dart'; +import 'cool_alert_buttons.dart'; + class CoolAlertContainer extends StatelessWidget { final CoolAlertOptions options; @@ -94,17 +95,10 @@ class CoolAlertContainer extends StatelessWidget { child: options.lottieAsset == null ? FlareActor( anim, - animation: - options.loopAnimation ? options.flareAnimationName : null, - controller: options.loopAnimation - ? null - : SingleLoopController( - options.flareAnimationName!, - 1, - ), + animation: options.loopAnimation ? options.flareAnimationName : null, + controller: options.loopAnimation ? null : SingleLoopController(options.flareAnimationName!, 1), ) - : Lottie.asset(options.lottieAsset!, - repeat: options.loopAnimation), + : Lottie.asset(options.lottieAsset!, repeat: options.loopAnimation), ), ); } @@ -135,6 +129,8 @@ class CoolAlertContainer extends StatelessWidget { Theme.of(context).textTheme.titleLarge?.copyWith( fontWeight: FontWeight.bold, ), + textAlign: options.titleTextAlign, + overflow: options.titleOverflow, ), ); } @@ -152,8 +148,9 @@ class CoolAlertContainer extends StatelessWidget { } return Text( text ?? '', - textAlign: TextAlign.center, + textAlign: options.textTextAlign, style: options.textTextStyle, + overflow: options.textOverflow, ); } } diff --git a/pubspec.lock b/pubspec.lock index c58a00e..48d94b9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: archive - sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" url: "https://pub.dev" source: hosted - version: "3.3.6" + version: "4.0.4" async: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -45,26 +45,26 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.17.0" - convert: - dependency: transitive + version: "1.19.0" + cool_flare: + dependency: "direct main" description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + name: cool_flare + sha256: f71bdbdb5ada377b5e19a92b8150f06b253ada4c6ef21ad819a247095a13aed2 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.0" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.6" fake_async: dependency: transitive description: @@ -73,14 +73,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" - flare_flutter: - dependency: "direct main" + ffi: + dependency: transitive description: - name: flare_flutter - sha256: "99d63c60f00fac81249ce6410ee015d7b125c63d8278a30da81edf3317a1f6a0" + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "2.1.3" flutter: dependency: "direct main" description: flutter @@ -99,14 +99,46 @@ packages: description: flutter source: sdk version: "0.0.0" - js: + http: + dependency: transitive + description: + name: http + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f + url: "https://pub.dev" + source: hosted + version: "1.3.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: dependency: transitive description: - name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "3.0.1" lints: dependency: transitive description: @@ -119,87 +151,87 @@ packages: dependency: "direct main" description: name: lottie - sha256: "49bbc544e44bf0c734ccda29b182e3516a12f5021ea98b206cf31a168b0f97da" + sha256: c5fa04a80a620066c15cf19cc44773e19e9b38e989ff23ea32e5903ef1015950 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "3.3.1" matcher: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.15.0" path: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.2" - pointycastle: + version: "1.9.0" + posix: dependency: transitive description: - name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + name: posix + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a url: "https://pub.dev" source: hosted - version: "3.6.2" + version: "6.0.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -212,10 +244,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.7.3" typed_data: dependency: transitive description: @@ -232,6 +264,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" + source: hosted + version: "14.3.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.6.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index fa1e4c7..82bb90c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,17 +1,24 @@ -name: cool_alert -description: A Flutter package to display animated alert dialogs such as - success, error, warning, confirm or even a loading dialog. -version: 2.0.1 -homepage: https://github.com/emrade/flutter_cool_alert.git +name: cooler_alerts +description: A Flutter package to display animated alert dialogs, replacement for cool_alert. +version: 2.1.2 +homepage: https://cooler-alerts.web.app/ +repository: https://github.com/cybex-dev/cooler_alerts.git +issue_tracker: https://github.com/cybex-dev/cooler_alerts/issues +topics: + - flutter + - alert + - dialog + - notifications + - popup environment: - sdk: ">=2.18.0 <3.0.0" + sdk: ">=2.18.0 <4.0.0" dependencies: - flare_flutter: ^3.0.2 flutter: sdk: flutter - lottie: ^2.2.0 + cool_flare: ^3.1.0 + lottie: ^3.3.1 vector_math: ^2.1.4 dev_dependencies: