I have 3 Rows and i want draw a picture as a line, please look at picture. I tryed stack but dosent work for me
CodePudding user response:
Try this code
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(primarySwatch: Colors.blue),
home: Stack(
children: [
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(width: 60, height: 60, color: Colors.red),
Container(width: 60, height: 60, color: Colors.green),
Container(width: 60, height: 60, color: Colors.blue),
],
),
),
Center(
child: Container(
color: Colors.purple,
height: 10,
width: 200,
),
),
],
),
);
}
}
Result:
Live example: DartPad