Inscription – sword tianya, start from your drip accumulation, and will keep improving, that is, toss every day.
Important message
- The Analysis video tutorial on Flutter’s network request dio use is here
- Flutter goes from getting started with practice to developing an APP UI basics video
- Flutter goes from getting started to developing an APP
- Flutter cross-platform development bit by bit analysis series article series is here
The difference is that Expanded enforces padding of remaining white space, while Flexible does not. As shown in the figure below.
The core code is as follows:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; class FlexMain2Page extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State {@override Widget build(BuildContext context) {return Scaffold(
appBar: AppBar(
title: Text("Layout"),), the body: the Row (crossAxisAlignment: crossAxisAlignment. Start, children: < widgets > / / / / the contents of the area a Container (padding: EdgeInsets.all(10), child: Text("Text TWO"/// Flexible(Flex: 1, child: Container(width: 120, padding: EdgeInsets.all(10), child: Text("Disciplined, good at action, accumulation, focus on the future, you may not live up to your youth."), color: Colors.grey[500], ), ), ], ), ); }}Copy the code