Flutter

How to make flutter app draw behind android navigation bar and make navigation bar fully transparent?

只谈情不闲聊 提交于 2021-02-05 19:07:18
问题 I would like to make my Flutter app take up the entire screen in Android while still showing both the status bar and the navigation bar, with both of them transparent, to achieve the full screen look like in iOS. The status bar color can be easily changed, but right now I'm facing problems with getting the app to fill up the screen and making the navigation bar transparent at the same time. By default, the app is not drawn below the navigation bar at all (I've set the status bar color to be

Inkwell not showing ripple when used with Container decoration

拥有回忆 提交于 2021-02-05 14:55:25
问题 I want to add a ripple on an item, it is working fine until I add a gradient on the item using BoxDecoration . Widget build(BuildContext context) { return Container( margin: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), child: Material( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0)), elevation: 6.0, shadowColor: Colors.grey[50], child: InkWell( onTap: () {}, child: Container( decoration: BoxDecoration( gradient: LinearGradient( begin: AlignmentDirectional

Inkwell not showing ripple when used with Container decoration

北城以北 提交于 2021-02-05 14:55:14
问题 I want to add a ripple on an item, it is working fine until I add a gradient on the item using BoxDecoration . Widget build(BuildContext context) { return Container( margin: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), child: Material( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(4.0)), elevation: 6.0, shadowColor: Colors.grey[50], child: InkWell( onTap: () {}, child: Container( decoration: BoxDecoration( gradient: LinearGradient( begin: AlignmentDirectional

How to show/hide password in TextFormField?

六眼飞鱼酱① 提交于 2021-02-05 14:22:58
问题 Currently I have my password TextFormField like this: TextFormField( decoration: const InputDecoration( labelText: 'Password', icon: const Padding( padding: const EdgeInsets.only(top: 15.0), child: const Icon(Icons.lock), )), validator: (val) => val.length < 6 ? 'Password too short.' : null, onSaved: (val) => _password = val, obscureText: true, ); I want a button like interaction which will make password visible and invisible. Can I do it inside TextFormField ? Or I will have to make a Stack

How to show/hide password in TextFormField?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-05 14:20:16
问题 Currently I have my password TextFormField like this: TextFormField( decoration: const InputDecoration( labelText: 'Password', icon: const Padding( padding: const EdgeInsets.only(top: 15.0), child: const Icon(Icons.lock), )), validator: (val) => val.length < 6 ? 'Password too short.' : null, onSaved: (val) => _password = val, obscureText: true, ); I want a button like interaction which will make password visible and invisible. Can I do it inside TextFormField ? Or I will have to make a Stack

How to show/hide password in TextFormField?

谁说我不能喝 提交于 2021-02-05 14:20:09
问题 Currently I have my password TextFormField like this: TextFormField( decoration: const InputDecoration( labelText: 'Password', icon: const Padding( padding: const EdgeInsets.only(top: 15.0), child: const Icon(Icons.lock), )), validator: (val) => val.length < 6 ? 'Password too short.' : null, onSaved: (val) => _password = val, obscureText: true, ); I want a button like interaction which will make password visible and invisible. Can I do it inside TextFormField ? Or I will have to make a Stack

How to correctly set redirect_uri in Flutter app?

浪尽此生 提交于 2021-02-05 11:51:50
问题 I'm trying to log the user into a Google API from my Flutter app, but can't get it to automatically fetch the token. The closest I got was to see the token string in the auth screen and be asked to copy/paste it back into the app. I suspect it's related to the redirect_uri parameter. I attempted with both oauth2_client and flutter_appauth and it's pretty much the same outcome. When setting up the client, if I use the first redirect_uri provided by Google urn:ietf:wg:oauth:2.0:oob , after

Add New Widget on button click with a finction that returns a widget

自闭症网瘾萝莉.ら 提交于 2021-02-05 11:46:01
问题 Hello i am new to Flutter and I want to know if there is a way to add new Widgets with a button click. I looked into many stack overflow similar Questions. but due to my poor knowledge most of them seems complex to me and hard to grasp. All i need to do is add some containers below old build containers class MedPreC extends StatefulWidget { @override _MedPreCState createState() => _MedPreCState(); } Widget returnWidget() { return Padding( padding: const EdgeInsets.all(8.0), child: Container(

Add New Widget on button click with a finction that returns a widget

╄→尐↘猪︶ㄣ 提交于 2021-02-05 11:45:30
问题 Hello i am new to Flutter and I want to know if there is a way to add new Widgets with a button click. I looked into many stack overflow similar Questions. but due to my poor knowledge most of them seems complex to me and hard to grasp. All i need to do is add some containers below old build containers class MedPreC extends StatefulWidget { @override _MedPreCState createState() => _MedPreCState(); } Widget returnWidget() { return Padding( padding: const EdgeInsets.all(8.0), child: Container(

How to query a list of Objects with Firebase in Flutter

泪湿孤枕 提交于 2021-02-05 11:45:28
问题 I want to be able to query my collections for document Ids, and then get a list of documents. For Example: Collection [Users] -> Documents [001], [002], [003]. Now I want to query in Users for the ids 001 and 003. Is there an easy way to do this in flutter, or is the recommended way to just just query for 001 and 003 individually ? 回答1: You can use an in query for anywhere up to 10 documents. collectionRef.where("country", whereIn: ["USA", "Japan"]) If you have more than 10, you can either