flutter-layout

How to put opacity for container in flutter

不羁的心 提交于 2020-06-13 14:19:28
问题 I want to put opacity for container which contain hexadecimal color code. I am new to flutter. Please help me. Here is the code. Thanks in advance. final body = Container( width: MediaQuery.of(context).size.width, margin: const EdgeInsets.only(left: 40.0, right: 40.0), padding: EdgeInsets.all(28.0), decoration: new BoxDecoration( color: const Color(0xFF0E3311),//here i want to add opacity border: new Border.all(color: Colors.black54, ), borderRadius: new BorderRadius.only( topLeft: const

flutter dosn't run on ios

十年热恋 提交于 2020-06-13 08:58:31
问题 I am trying to run my flutter code on ios but I am facing exit during running or building the app. the code is building fine in android however on ios I can't build it. I tried to google on the issue but I am not finding yet the answer. I found suggestion to change the platform iso target to 9.0. it did fix the pod install but not yet able to run my flutter here is what I got log from command flutter run --verbose [ +5 ms] Found plugin firebase_auth at /Users/ainnaaa/.pub-cache/hosted/pub

flutter dosn't run on ios

只愿长相守 提交于 2020-06-13 08:57:10
问题 I am trying to run my flutter code on ios but I am facing exit during running or building the app. the code is building fine in android however on ios I can't build it. I tried to google on the issue but I am not finding yet the answer. I found suggestion to change the platform iso target to 9.0. it did fix the pod install but not yet able to run my flutter here is what I got log from command flutter run --verbose [ +5 ms] Found plugin firebase_auth at /Users/ainnaaa/.pub-cache/hosted/pub

Drawing a line Between Widgets

情到浓时终转凉″ 提交于 2020-06-12 15:38:59
问题 In my Flutter application, I want to connect two arbitrary boxes with a line. The example shows two MyBoxes in a GridView . I want to swipe from MyBox on the left to MyBox on the right and draw a line in the space between them to show the connection. However, I couldn't find a way to draw lines beyond the widget border. Is there a way to do this with drawing tricks like CustomPainter, or with changes to the widget's structure? 回答1: I thought that this might be a nice challenge, so I just

Drawing a line Between Widgets

孤者浪人 提交于 2020-06-12 15:37:22
问题 In my Flutter application, I want to connect two arbitrary boxes with a line. The example shows two MyBoxes in a GridView . I want to swipe from MyBox on the left to MyBox on the right and draw a line in the space between them to show the connection. However, I couldn't find a way to draw lines beyond the widget border. Is there a way to do this with drawing tricks like CustomPainter, or with changes to the widget's structure? 回答1: I thought that this might be a nice challenge, so I just

How to pass Taps to widgets below the top widget?

廉价感情. 提交于 2020-06-12 07:03:15
问题 I'm trying to implement a very simple version of Card Paginator Component (single card) in Flutter. Here is an example of a basic demo I've created: class CardComponent extends StatelessWidget { @override Widget build(BuildContext context) { return Stack( children: [ Positioned( top: 20.0, left: 20.0, child: GestureDetector( // onTap should run while the text is visible on the screen // The text will become invisible when the Listview gest scrolled upwards onTap: (){print('text tapped');},

How to use CustomMultiChildLayout & CustomSingleChildLayout in Flutter

邮差的信 提交于 2020-06-09 08:29:49
问题 Can someone with experience in using CustomSingleChildLayout and CustomMultiChildLayout classes be able to explain in detail (with examples) in how to use them. I am new to Flutter and am trying to understand how to use these. However, the documentation is horrible and is not clear. I tried to scour the internet for examples, but there aren't any other documentation. I would be eternally grateful if you could help. Thank you! 回答1: First of all, I want to say that I am glad to help you with

Flutter directed graph. Can I use CustomPainter Class with custom widgets?

自作多情 提交于 2020-06-08 04:07:41
问题 I want to build a directed graph like in the picture below with flutter. I dont know where to start. I searched at internet without success. Which algorihms do I need for this kind of graph? I tried to build this graph with custom painter class. I dont know how to use custom widgets inside custom painter class. (for example a rect with a picture of person and text beside). I only was able to draw rect and lines... Zoom and pan I thought I can do with GestureDetector class. The graph should be

Why only the content in ListView.builder() is not scrolling?

吃可爱长大的小学妹 提交于 2020-06-01 06:47:29
问题 I have a screen with Text widgets and ListView, and when I try to scroll inside the ListView, it doesn't allow me to scroll. My body is SingleChildScrollView but that doesn't provide scrollView for the ListView.builder. I tried to wrap the ListView.build inside Expanded, but didn't work out. class HomePageState extends State<HomePage> { @override Widget build(BuildContext context) { return Scaffold( appBar: new AppBar( title: Text("MyBar"), centerTitle: true, ), body: SingleChildScrollView

How to use 'CupertinoFullscreenDialogTransition'?

你说的曾经没有我的故事 提交于 2020-06-01 06:38:32
问题 I didn't find any example for constructor CupertinoFullscreenDialogTransition https://api.flutter.dev/flutter/cupertino/CupertinoFullscreenDialogTransition-class.html I tried to understand below code but I didn't get it. CupertinoFullscreenDialogTransition({ Key key, @required Animation<double> animation, @required this.child, }) : _positionAnimation = CurvedAnimation( parent: animation, curve: Curves.linearToEaseOut, // The curve must be flipped so that the reverse animation doesn't play //