Skip to content

Instantly share code, notes, and snippets.

@doyle-flutter
Last active August 8, 2021 15:45
Show Gist options
  • Save doyle-flutter/bbafb64b8f95b9abbd22351d35b63714 to your computer and use it in GitHub Desktop.
Save doyle-flutter/bbafb64b8f95b9abbd22351d35b63714 to your computer and use it in GitHub Desktop.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
const App({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(home: Main(),);
}
}
class Main extends StatelessWidget {
TextStyle _titleStyle = TextStyle(fontSize: 22.0, color: Colors.white, fontWeight: FontWeight.bold);
TextStyle _subTitleStyle = TextStyle(fontSize: 14.0, color: Colors.white);
@override
Widget build(BuildContext context) {
return Scaffold(
drawer: Drawer(),
backgroundColor: Colors.black54,
appBar: AppBar(
backgroundColor: Colors.black,
title: Text("Flutter Design Clone"),
actions: [
IconButton(
icon: Icon(Icons.search),
onPressed: (){},
)
],
),
body: Container(
width: MediaQuery.of(context).size.width,
child: Container(
child: Column(
children: [
Expanded(
child: Row(
children: [
Expanded(
flex: 2,
child: Container(
margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage("https://cdn.pixabay.com/photo/2017/02/08/12/46/moon-2048727__480.jpg")
)
),
child: Column(
children: [
Expanded(
child: Icon(Icons.map, color: Colors.white,size: 40.0,),
),
Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(bottom: 10.0, left: 40.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Title", style: this._titleStyle,),
Text("desdesdesdes", style: this._subTitleStyle,)
],
),
)
],
),
)
),
Expanded(
child: Container(
margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage("https://cdn.pixabay.com/photo/2017/06/26/20/37/palm-2445110__480.jpg")
)
),
)
),
],
),
),
Expanded(
flex: 3,
child: Container(
child: Row(
children: [
Expanded(
child: Column(
children: [
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage("https://cdn.pixabay.com/photo/2017/06/06/16/48/woman-2377742__480.jpg")
)
),
),
),
Expanded(
flex: 2,
child: Container(
margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(30.0),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage("https://cdn.pixabay.com/photo/2015/06/19/09/39/lonely-814631__480.jpg")
)
),
),
)
],
),
),
Expanded(
child: Column(
children: [
Expanded(
flex: 2,
child: Container(
alignment: Alignment.center,
margin: EdgeInsets.all(10.0),
padding: EdgeInsets.only(bottom: 20.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.brown, width: 4.0),
borderRadius: BorderRadius.circular(30.0),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage("https://cdn.pixabay.com/photo/2017/11/13/07/14/cats-eyes-2944820__480.jpg")
)
),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("SubTitle", style: this._titleStyle,),
Text("desdesdesdes", style: this._subTitleStyle,)
],
),
),
),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.all(10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage("https://cdn.pixabay.com/photo/2021/07/20/20/32/woman-6481696__480.jpg")
)
),
),
)
],
),
),
],
),
),
),
],
),
),
),
bottomNavigationBar: BottomNavigationBar(
unselectedItemColor: Colors.white38,
selectedItemColor: Colors.red,
backgroundColor: Colors.black,
showSelectedLabels: false,
showUnselectedLabels: false,
type: BottomNavigationBarType.fixed,
items: <IconData>[Icons.home, Icons.send_rounded, Icons.multitrack_audio_rounded, Icons.favorite, Icons.settings].map<BottomNavigationBarItem>(
(IconData e) => BottomNavigationBarItem(
label: "",
icon: Icon(e)
)
).toList(),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment