forked from MisterJimson/flutter_keyboard_visibility
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix MisterJimson#101 Gesture Arena conflicts * Added ignore keyboard and config * update example app for testing * refactor * docs * docs Co-authored-by: Kensai <[email protected]> Co-authored-by: Jason Rai <[email protected]>
- Loading branch information
1 parent
8ef31d6
commit 68feb30
Showing
13 changed files
with
346 additions
and
112 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r_keyboard_visibility/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
flutter_keyboard_visibility/example/lib/demo_with_provider.dart
This file was deleted.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
flutter_keyboard_visibility/example/lib/keyboard_dismiss_demo.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart'; | ||
|
||
class KeyboardDismissDemo extends StatelessWidget { | ||
const KeyboardDismissDemo({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
title: Text('Keyboard Dismiss Demo'), | ||
), | ||
body: SafeArea( | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: Column( | ||
children: [ | ||
KeyboardDismissOnTap( | ||
child: Container( | ||
height: 80, | ||
width: double.infinity, | ||
color: Colors.red, | ||
child: Center(child: Text('Red dismisses on tap')), | ||
), | ||
), | ||
KeyboardDismissOnTap( | ||
child: Container( | ||
height: 80, | ||
width: double.infinity, | ||
color: Colors.blue, | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text('Button does not dismiss, blue does'), | ||
ElevatedButton( | ||
onPressed: () {}, | ||
child: Text('Button'), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
KeyboardDismissOnTap( | ||
dismissOnCapturedTaps: true, | ||
child: Container( | ||
height: 80, | ||
width: double.infinity, | ||
color: Colors.green, | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text('Button and green both dismiss'), | ||
ElevatedButton( | ||
onPressed: () {}, | ||
child: Text('Button'), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
KeyboardDismissOnTap( | ||
child: Container( | ||
height: 80, | ||
width: double.infinity, | ||
color: Colors.orange, | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
Text('Orange dismisses, black does not'), | ||
IgnoreKeyboardDismiss( | ||
child: Container( | ||
margin: EdgeInsets.only(top: 4), | ||
height: 40, | ||
width: 40, | ||
color: Colors.black, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
Spacer(), | ||
TextField( | ||
keyboardType: TextInputType.text, | ||
decoration: InputDecoration( | ||
labelText: 'Input box for keyboard test', | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.