Skip to content

Instantly share code, notes, and snippets.

@Hesamedin
Last active February 16, 2021 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hesamedin/33a4948675540d0b144a7f19db73da63 to your computer and use it in GitHub Desktop.
Save Hesamedin/33a4948675540d0b144a7f19db73da63 to your computer and use it in GitHub Desktop.
Scaffold(
appBar: AppBar(...),
body: WillPopScope(
onWillPop: onBackClick,
child: CustomScrollView(
slivers: <Widget>[
SliverToBoxAdapter(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
...
],
),
),
SliverFillRemaining(
hasScrollBody: false,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(child: Container()),
ElevatedButton(
onPressed: () {
FocusScope.of(context).unfocus(); // Remove Keyboard
// Validate Form
// Submit the form
},
child: Text("Submit"),
),
],
),
),
],
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment