Import 'package:flutter/foundation.dart' Ĭonst double _kFloatingActionButtonMargin = 16.0 // TODO(hmuller): should be device dependentĬonst Duration _kFloatingActionButtonSegue = const Duration ( milliseconds : 200 ) įinal Tween _kFloatingActionButtonTurnTween = new Tween ( begin : - 0.125, end : 0. return SafeArea ( minimum: const EdgeInsets.all (32.0), child: Scaffold ( //. Are you trying to set minimum height or width of Container() widget in a Flutter, then use constraints attribute and apply BoxConstraints() on it like. So the best way to do this is: Expanded ( child: Text (document 'content', textAlign: TextAlign.start, overflow: TextOverflow.ellipsis, maxLines: 20, )) Maybe try using TextField Widget like this as shown below: new TextField ( keyboardType: TextInputType. ![]() Use of this source code is governed by a BSD-style license that can be 3 Answers Sorted by: 4 Have you tried wrapping your Scaffold in SafeArea with a minimum property of EdgeInsets.all (32.0) For me, this recreates your mockup on any screen Example code: //. ![]() Blob: 426b01a4fed7c4de2bfc0f42c8608eba8358b601 If you see the sample code, the containers width and height are greater than the phones dimensions(in portrait mode) but when its actually rendered or drawn on. double width MediaQuery.of(context).size.width print(width) //output: 392.72727272727275 double halfwidth width 0.5 //50 width of screen print(halfwidth) //output: 196.36363636363637 double height MediaQuery.of(context).size.height print(height) //output: 803.6363636363636 double smallheight height 0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |