-
-
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.
feat: ✨ adds autolink and nullsafety
Null Safety
- Loading branch information
1 parent
d55f975
commit cfc371c
Showing
10 changed files
with
316 additions
and
66 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,21 +1,29 @@ | ||
# WidgetKit | ||
|
||
A kit of widgets that are (almost) always needed in the different apps. | ||
A kit of widgets that are (almost) always needed in the different Flutter apps. | ||
|
||
## List of widgets | ||
## List of Widgets | ||
|
||
- Shared: Widgets that can be used globally, regardless of which app you are based off(Material or Cupertino). | ||
- Material: Widgets for MaterialApp based apps or for the Material look and feel. | ||
- (WIP)Cupertino: Widgets for CupertinoApp based apps or for the Cupertino(iOS) look and feel. | ||
- [Shared](#shared): Widgets that can be used globally, regardless of which app you are based off(Material or Cupertino). | ||
- [Material](#material): Widgets for MaterialApp based apps or for the Material look and feel. | ||
- [Cupertino](#cupertino) **(Coming Soon!)**: Widgets for CupertinoApp based apps or for the Cupertino(iOS) look and feel. | ||
|
||
### Shared | ||
|
||
#### HideKeyboardOnTouchOutside | ||
|
||
A widget that you can use to wrap other widgets (like a Scaffold or a Form) that usually contain inputs, this will help hide the keyboard when touching outside. | ||
|
||
#### AutolinkText | ||
|
||
A text widget, that turns URLs, email and phone numbers into clickable inline links in text for flutter. A null safe version of FogNature's [AutolinkText](https://github.com/FogNature/flutter_autolink_text). | ||
|
||
### Material | ||
|
||
#### Password TextField | ||
|
||
A widget that allows you to show or hide the password already embedded. | ||
A widget that allows you to show or hide the password already embedded. | ||
|
||
### Cupertino | ||
|
||
#### Coming Soon |
2 changes: 1 addition & 1 deletion
2
example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,16 +7,15 @@ void main() { | |
} | ||
|
||
class MyApp extends StatelessWidget { | ||
// This widget is the root of your application. | ||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp( | ||
title: 'Flutter Demo', | ||
title: 'Widgetkit Demo', | ||
theme: ThemeData( | ||
primarySwatch: Colors.blue, | ||
primarySwatch: Colors.blueGrey, | ||
visualDensity: VisualDensity.adaptivePlatformDensity, | ||
), | ||
home: MyHomePage(title: 'Flutter Demo Home Page'), | ||
home: MyHomePage(title: 'Widgetkit Demo'), | ||
); | ||
} | ||
} | ||
|
@@ -42,17 +41,76 @@ class _MyHomePageState extends State<MyHomePage> { | |
padding: const EdgeInsets.all(8.0), | ||
child: ListView( | ||
children: [ | ||
Text( | ||
"PasswordTextField", | ||
style: Theme.of(context).textTheme.headline6, | ||
), | ||
SizedBox(height: 16), | ||
PasswordTextField(), | ||
SizedBox(height: 16), | ||
PasswordTextField( | ||
decoration: InputDecoration( | ||
border: OutlineInputBorder(), | ||
), | ||
), | ||
SizedBox(height: 32), | ||
Text( | ||
"CupertinoPasswordTextField", | ||
style: Theme.of(context).textTheme.headline6, | ||
), | ||
SizedBox(height: 16), | ||
CupertinoTextField( | ||
obscureText: true, | ||
suffix: Icon(CupertinoIcons.eye), | ||
suffix: Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 8), | ||
child: Icon(CupertinoIcons.eye), | ||
), | ||
), | ||
SizedBox(height: 32), | ||
Text( | ||
"AutolinkText", | ||
style: Theme.of(context).textTheme.headline6, | ||
), | ||
SizedBox(height: 16), | ||
AutolinkText( | ||
"Hello world from https://www.flutter.dev/", | ||
textStyle: TextStyle(color: Colors.black), | ||
linkStyle: TextStyle( | ||
color: Colors.blue, | ||
decoration: TextDecoration.underline, | ||
), | ||
onWebLinkTap: (String url) => print(url), | ||
), | ||
SizedBox(height: 16), | ||
AutolinkText( | ||
"Humanized (removes scheme) https://www.flutter.dev/", | ||
humanize: true, | ||
textStyle: TextStyle(color: Colors.black), | ||
linkStyle: TextStyle( | ||
color: Colors.blue, | ||
decoration: TextDecoration.underline, | ||
), | ||
onWebLinkTap: (String url) => print(url), | ||
), | ||
SizedBox(height: 16), | ||
AutolinkText( | ||
"Autolink email [email protected]", | ||
textStyle: TextStyle(color: Colors.black), | ||
linkStyle: TextStyle( | ||
color: Colors.green, | ||
decoration: TextDecoration.underline, | ||
), | ||
onEmailTap: (String url) => print(url), | ||
), | ||
SizedBox(height: 16), | ||
AutolinkText( | ||
"Autolink phone +50688884444", | ||
textStyle: TextStyle(color: Colors.black), | ||
linkStyle: TextStyle( | ||
color: Colors.orange, | ||
decoration: TextDecoration.underline, | ||
), | ||
onPhoneTap: (String url) => print(url), | ||
), | ||
], | ||
), | ||
|
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
Oops, something went wrong.