How to make a multi column Flutter DataTable widget span the full width?
You can add the crossAxisAlignment for your Column to strech crossAxisAlignment: CrossAxisAlignment.stretch
You can add the crossAxisAlignment for your Column to strech crossAxisAlignment: CrossAxisAlignment.stretch
It seems like you are trying to close something which is defined in your AppProvider class. If AppProvider class is extending ChangeNotifier, the change notifier class provides dispose method, you can override it and then call the close function inside the AppProvider class only.
PageController constructor has named parameter initialPage. You can use it, just create the controller somewhere outside of build function: class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { PageController controller; @override void initState() { super.initState(); controller = PageController(initialPage: 3); } @override void dispose() { controller.dispose(); super.dispose(); } @override … Read more
This is not implemented yet. However you can achieve similar results by using SliverAppBar designed for CustomScrollView. Bear in mind that this is not optimal though. As it required hard coding the size of the icons and stuff. Due to FlexibleSpacebar not having width constraint. import ‘package:flutter/material.dart’; import ‘package:cloud_firestore/cloud_firestore.dart’; import ‘package:flutter_project/materialSheet.dart’; void main() => runApp(new … Read more
The problem comes from SliverGridDelegateWithFixedCrossAxisCount: Creates grid layouts with a fixed number of tiles in the cross axis This delegate creates grids with equally sized and spaced tiles. I recommend you to use flutter_staggered_grid_view: and to give up to AspectRatio widget. More about tiles here. body: StaggeredGridView.countBuilder( crossAxisCount: 2, itemCount: 6, itemBuilder: (BuildContext context, int … Read more
You can set the offset property of BoxShadow. It is defined as Offset(double dx, double dy). So, for example: boxShadow: [ BoxShadow( blurRadius: 5.0, offset: Offset(3.0, 0), ), ], This will cast a shadow only at 3 units to the right (dx).
Wrap widget solves your problem. If there is not enough space to fit the child in a Column or Row, you can use Wrap. You can use alignment, directionality and spacing properties to customize it. Here is the simple example: class WrapExample extends StatelessWidget { @override Widget build(BuildContext context) { return SizedBox( width: 200, height: … Read more
If you have the comments data already, simply create a List, then pass it to the children property of the Column. Something like: var commentWidgets = List<Widget>(); for (var comment in comments) { commentWidgets.Add(Text(comment.text)); // TODO: Whatever layout you need for each widget. } … new Expanded( child: new ListView( shrinkWrap: true, children: <Widget>[ // … Read more
You can use Radio + text widget instead of RadioListTile. For removing internal padding in Radio widget set: Radio( visualDensity: const VisualDensity( horizontal: VisualDensity.minimumDensity, vertical: VisualDensity.minimumDensity), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, ….. ),