Flutter

how can I make BottomNavigationBar stick on top of keyboard flutter

守給你的承諾、 提交于 2021-02-06 08:35:33
问题 I am trying to make a simple chat app, so I created a scaffold and my body, will be the messages and my bottomNavigationBar would be my typing field and sending icon. I added a text field but when typing the navigation bar is hidden by the keyboard. this is the code of my BottomNavigationBar : bottomNavigationBar: new Container( height: ScreenSize.height/12, /*color: Colors.red,*/ child: new Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ new Column(

Placing two trailing icons in ListTile

一个人想着一个人 提交于 2021-02-06 06:33:56
问题 I want to place two icons, side by side on the "trailing" side of a ListTile. I tried adding a Row widget with the two icons inside, but it completely messed up the layout of the entire ListTile, making it unusable. Is there any way to expand the space allocated for the trailing part? Here's the code: import 'package:flutter/material.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title:

Placing two trailing icons in ListTile

扶醉桌前 提交于 2021-02-06 06:32:58
问题 I want to place two icons, side by side on the "trailing" side of a ListTile. I tried adding a Row widget with the two icons inside, but it completely messed up the layout of the entire ListTile, making it unusable. Is there any way to expand the space allocated for the trailing part? Here's the code: import 'package:flutter/material.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title:

How to do Navigator.popUntil properly when using different animations for each push

余生颓废 提交于 2021-02-06 04:25:36
问题 I am trying to rebuild iOS app in Flutter, but facing a problem with navigation. Here what I am trying to do: List of Added Exchange Pairs with Add button (A screen) Add button opens Picker with Exchanges (B screen) with transition from bottom to top. By tapping on exchange it pushes new Picker with Pairs (C screen) with transition from right to left. when user taps on pair it closes all pickers at once and deliver result of picking to A screen. I have tried double pop and popUntil but result

Flutter - TextPainter vs Paragraph for drawing book page

跟風遠走 提交于 2021-02-06 02:57:10
问题 I need to display long text, which will occupy several screens/pages. I have to add some features also, so I would like to implement my own text displaying component. I found two classes that corresponds to this task: TextPainter use TextSpan for text use paint(canvas, offset) for painting Paragraph use "queue" for text and styles for them use Canvas.drawParagraph(paragraph, offset) for painting What is the difference between them and which one to use?! If the text contains 100 lines and only

How to open app links in flutter webview?

半城伤御伤魂 提交于 2021-02-05 20:33:15
问题 In Flutter, I use the flutter webview plugin to launch a url like: flutterWebviewPlugin.launch(url) or WebviewScaffold( url: url, appBar: new AppBar(title: Text(title), actions: [ new IconButton( icon: const Icon(Icons.share), onPressed: () => Share.share(url), ) ]), withZoom: true, withLocalStorage: true, withJavascript: true, ); However, if any links inside the opened web page is an app link, like: fb://profile , I will get net::ERR_UNKNOWN_URL_SCHEME. In android, I found the solution is to

How do I rotate something 15 degrees in Flutter?

こ雲淡風輕ζ 提交于 2021-02-05 20:13:56
问题 The Flutter docs show an example of rotating a "div" by 15 degrees, both for HTML/CSS and Flutter code: The Flutter code is: var container = new Container( // gray box child: new Center( child: new Transform( child: new Text( "Lorem ipsum", ), alignment: FractionalOffset.center, transform: new Matrix4.identity() ..rotateZ(15 * 3.1415927 / 180), ), ), ); And the relevant parts are new Transform and alignment: FractionalOffset.center and transform: new Matrix4.identity()..rotateZ(15 * 3.1415927

Flutter - Streaming and Caching videos

早过忘川 提交于 2021-02-05 20:09:24
问题 I'm developing an application in flutter which is showing videos in a list (like Instagram). Videos must be streamed so I can't download them first and then play them. I want to cache them while they are being streamed. I've seen CacheManager class but it will download the whole file and then pass it to video player to play it. How can I implement a cache manager to show the video file while it is being downloaded to cache folder? 回答1: I might be writing this a bit late but just in case

Flutter - Streaming and Caching videos

守給你的承諾、 提交于 2021-02-05 20:01:58
问题 I'm developing an application in flutter which is showing videos in a list (like Instagram). Videos must be streamed so I can't download them first and then play them. I want to cache them while they are being streamed. I've seen CacheManager class but it will download the whole file and then pass it to video player to play it. How can I implement a cache manager to show the video file while it is being downloaded to cache folder? 回答1: I might be writing this a bit late but just in case

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

故事扮演 提交于 2021-02-05 19:14:07
问题 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