mirror of
https://github.com/Iconica-Development/flutter_form_wizard.git
synced 2025-05-19 02:43:48 +02:00
Updated README, added GIF, added Github Actions, Fixed example routing and layout of button
This commit is contained in:
parent
d3adebdfc5
commit
8fd2a3a58f
6 changed files with 42 additions and 8 deletions
32
.github/workflows/flutter.yml
vendored
Normal file
32
.github/workflows/flutter.yml
vendored
Normal file
|
@ -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
|
|
@ -1,7 +1,10 @@
|
|||
[](https://github.com/Iconica-Development) [](https://github.com/Iconica-Development/flutter_form/actions/new) [](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.
|
||||
|
||||

|
||||
|
||||
## 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).
|
||||
|
|
|
@ -70,7 +70,8 @@ class CheckPageExample {
|
|||
title,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w900,
|
||||
fontSize: 20,
|
||||
fontSize: 16,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
|
|
|
@ -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"))
|
||||
],
|
||||
),
|
||||
|
|
|
@ -109,7 +109,7 @@ class _FormExampleState extends ConsumerState<FormExample> {
|
|||
options: FlutterFormOptions(
|
||||
onFinished: (Map<int, Map<String, dynamic>> results) {
|
||||
debugPrint("Final full results: $results");
|
||||
Navigator.of(context).pushNamed('/thanks');
|
||||
Navigator.of(context).pushReplacementNamed('/thanks');
|
||||
},
|
||||
onNext: (int pageNumber, Map<String, dynamic> results) {
|
||||
debugPrint("Results page $pageNumber: $results");
|
||||
|
@ -170,8 +170,6 @@ class _FormExampleState extends ConsumerState<FormExample> {
|
|||
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),
|
||||
|
|
BIN
flutter_form.gif
Normal file
BIN
flutter_form.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 MiB |
Loading…
Reference in a new issue