import 'package:flutter/material.dart';
void main () {
runApp(
MaterialApp(
home: Scaffold(
body: Container(
decoration: BoxDecoration(
border: Border.all(),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: 100,
height: 100,
color: Colors.red,
),
Container(
width: 100,
height: 150,
color: Colors.green,
),
Container(
width: 100,
height: 200,
color: Colors.blue,
),
],
)
),
),
)
);
}
import 'package:flutter/material.dart';
void main () {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Container(
decoration: BoxDecoration(
border: Border.all(),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 50,
height: 50,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red,
),
),
Expanded(
child: Container(
child: Text('聊天内容'),
color: Colors.blue,
),
),
Text('13:34'),
],
)
),
),
)
);
}
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Container(
decoration: BoxDecoration(
border: Border.all(),
),
child: Stack(
children: [
Container(
height: 640,
width: 430,
color: Colors.green,
),
Positioned(
top: 10,
left: 10,
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
),
Positioned(
top: 10,
left: 220,
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
),
Positioned(
top: 220,
left: 220,
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
),
Positioned(
top: 10,
left: 220,
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
),
Positioned(
top: 220,
left: 10,
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
),
Positioned(
top: 430,
left: 10,
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
),
Positioned(
top: 430,
right: 10,
child: Container(
width: 200,
height: 200,
color: Colors.white,
),
),
// Container(
// width: 200,
// height: 200,
// color: Colors.yellow,
// )
],
),
),
),
),
);
}