diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml new file mode 100644 index 0000000..50bb90a --- /dev/null +++ b/.github/workflows/flutter.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: + - master + - feature/* + - bugfix/* + - hotfix/* + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + /opt/hostedtoolcache/flutter + key: ${{ runner.OS }}-flutter-install-cache + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + - name: Flutter pub get + run: flutter pub get + - name: Flutter format + run: flutter format -o none --set-exit-if-changed . + - name: Flutter analyze + run: flutter analyze diff --git a/README.md b/README.md index 0c102f1..3f98c32 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ +[![pub package](https://img.shields.io/pub/v/flutter_date_time_picker.svg)](https://github.com/Iconica-Development) [![Build status](https://img.shields.io/github/workflow/status/Iconica-Development/flutter_form/CI)](https://github.com/Iconica-Development/flutter_form/actions/new) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart) # Flutter Form Flutter Form is a package you can use to create a single or multi page form with premade or custom inputfields. +![Form GIF](flutter_form.gif) + ## Features - Single or multi page form with the ability to define the navigational buttons. @@ -12,12 +15,10 @@ Flutter Form is a package you can use to create a single or multi page form with ## Setup -To use this package, add `flutter_form` as a [dependency in your pubspec.yaml file](https://flutter.dev/docs/development/platform-integration/platform-channels). +To use this package, add `flutter_form` as a dependency in your pubspec.yaml file. ## How To Use -See the [Example Code](example/lib/form_example.dart) for an example on how to use this package. - WARNING Make sure to define your FlutterFormInputControllers above your Flutter Form and not inside each page. This prevents that the used controllers differ from the registered ones. Flutter Form has two paramaters: options and formController. Each of these parameters' own parameters will be explained in tabels below. @@ -49,6 +50,7 @@ FormController: | nextStep() | Called to go to the next step. This is does not do anything else like autoNextStep does do. | | finishForm() | Calls the onFinished of the form options. | +See the [Example Code](example/lib/form_example.dart) for an example on how to use this package. ## Issues Please file any issues, bugs or feature request as an issue on our [GitHub](https://github.com/Iconica-Development/flutter_form/pulls) page. Commercial support is available if you need help with integration with your app or services. You can contact us at [support@iconica.nl](mailto:support@iconica.nl). diff --git a/example/lib/example_pages/check_page.dart b/example/lib/example_pages/check_page.dart index a2430c1..2b0828f 100644 --- a/example/lib/example_pages/check_page.dart +++ b/example/lib/example_pages/check_page.dart @@ -70,7 +70,8 @@ class CheckPageExample { title, style: const TextStyle( fontWeight: FontWeight.w900, - fontSize: 20, + fontSize: 16, + overflow: TextOverflow.ellipsis, ), ), const Spacer(), diff --git a/example/lib/example_pages/thanks_page.dart b/example/lib/example_pages/thanks_page.dart index 3e103c3..50e5902 100644 --- a/example/lib/example_pages/thanks_page.dart +++ b/example/lib/example_pages/thanks_page.dart @@ -22,7 +22,8 @@ class ThanksPage extends StatelessWidget { height: 20, ), ElevatedButton( - onPressed: () => Navigator.of(context).pushNamed('/'), + onPressed: () => + Navigator.of(context).popUntil(ModalRoute.withName('/')), child: const Text("Next")) ], ), diff --git a/example/lib/form_example.dart b/example/lib/form_example.dart index 708c84e..1543e50 100644 --- a/example/lib/form_example.dart +++ b/example/lib/form_example.dart @@ -109,7 +109,7 @@ class _FormExampleState extends ConsumerState { options: FlutterFormOptions( onFinished: (Map> results) { debugPrint("Final full results: $results"); - Navigator.of(context).pushNamed('/thanks'); + Navigator.of(context).pushReplacementNamed('/thanks'); }, onNext: (int pageNumber, Map results) { debugPrint("Results page $pageNumber: $results"); @@ -170,8 +170,6 @@ class _FormExampleState extends ConsumerState { top: size.height * 0.045, left: size.width * 0.07, ), - width: size.width * 0.08, - height: size.width * 0.08, decoration: BoxDecoration( borderRadius: BorderRadius.circular(90), color: const Color(0xFFD8D8D8).withOpacity(0.50), diff --git a/flutter_form.gif b/flutter_form.gif new file mode 100644 index 0000000..8adc28a Binary files /dev/null and b/flutter_form.gif differ