Skip to content

Instantly share code, notes, and snippets.

@Jahidul007
Last active December 14, 2021 20:24
Show Gist options
  • Save Jahidul007/b8cbc2af98ed304dcb13e6bf39e00d26 to your computer and use it in GitHub Desktop.
Save Jahidul007/b8cbc2af98ed304dcb13e6bf39e00d26 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(
scaffoldBackgroundColor: darkBlue,
),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: ColumnPositioned(),
),
),
);
}
}
class ColumnPositioned extends StatefulWidget {
@override
_ColumnPositionedState createState() => _ColumnPositionedState();
}
class _ColumnPositionedState extends State<ColumnPositioned>{
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Container(
color: Colors.yellow,
height: 50,
),),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Container(
color: Colors.brown,
height: 50,
),),
Expanded(
child: Column( children: [
Column(
children: [
Container(
color: Colors.green,
height: 50,
),
Container(
color: Colors.blue,
height: 50,
),
], // top widgets
),
Spacer(),
Container(
color: Colors.yellow,
height: 50,
) // bottom widget
]),
)
],
),
)
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment