parent
f35d1fa1db
commit
e6d2ed9ff7
@ -1,7 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class ColoursHelper {
|
|
||||||
static Color blue() => Color(0xff5e6ceb);
|
|
||||||
|
|
||||||
static Color blueDark() => Color(0xff4D5DFB);
|
|
||||||
}
|
|
@ -1,90 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MainWidget extends StatefulWidget {
|
|
||||||
@override
|
|
||||||
_MainWidgetState createState() => _MainWidgetState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MainWidgetState extends State<MainWidget> {
|
|
||||||
List<Data> dataList = [];
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
dataList.add(Data(Colors.amber, 'Amelia Brown',
|
|
||||||
'Life would be a great deal easier if dead things had the decency to remain dead.'));
|
|
||||||
dataList.add(Data(Colors.orange, 'Olivia Smith',
|
|
||||||
'That proves you are unusual," returned the Scarecrow'));
|
|
||||||
dataList.add(Data(Colors.deepOrange, 'Sophia Jones',
|
|
||||||
'Her name badge read: Hello! My name is DIE, DEMIGOD SCUM!'));
|
|
||||||
dataList.add(Data(Colors.red, 'Isabella Johnson',
|
|
||||||
'I am about as intimidating as a butterfly.'));
|
|
||||||
dataList.add(Data(Colors.purple, 'Emily Taylor',
|
|
||||||
'Never ask an elf for help; they might decide your better off dead, eh?'));
|
|
||||||
dataList.add(Data(Colors.green, 'Maya Thomas', 'Act first, explain later'));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: const EdgeInsets.all(20),
|
|
||||||
child: ListView.separated(
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
// physics: BouncingScrollPhysics(),
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
|
||||||
itemBuilder: (builder, index) {
|
|
||||||
return LimitedBox(
|
|
||||||
maxHeight: 150,
|
|
||||||
child: Container(
|
|
||||||
decoration: new BoxDecoration(
|
|
||||||
color: dataList[index].color,
|
|
||||||
borderRadius: new BorderRadius.all(
|
|
||||||
const Radius.circular(10.0),
|
|
||||||
)),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
child: Text(
|
|
||||||
dataList[index].name,
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'BalsamiqSans_Blod',
|
|
||||||
fontSize: 30,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.all(10),
|
|
||||||
child: Text(
|
|
||||||
dataList[index].detail,
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'BalsamiqSans_Regular',
|
|
||||||
fontSize: 15,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
separatorBuilder: (builder, index) {
|
|
||||||
return Divider(
|
|
||||||
height: 10,
|
|
||||||
thickness: 0,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: dataList.length),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Data {
|
|
||||||
MaterialColor color;
|
|
||||||
String name;
|
|
||||||
String detail;
|
|
||||||
|
|
||||||
Data(this.color, this.name, this.detail);
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class MenuWidget extends StatelessWidget {
|
|
||||||
final Function(String)? onItemClick;
|
|
||||||
|
|
||||||
const MenuWidget({Key? key, this.onItemClick}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
color: Colors.white,
|
|
||||||
padding: const EdgeInsets.only(top: 30),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
SizedBox(
|
|
||||||
height: 30,
|
|
||||||
),
|
|
||||||
CircleAvatar(
|
|
||||||
radius: 65,
|
|
||||||
backgroundColor: Colors.grey,
|
|
||||||
child: CircleAvatar(
|
|
||||||
radius: 60,
|
|
||||||
backgroundImage: AssetImage('assets/images/user_profile.jpg'),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'Nick',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
fontSize: 30,
|
|
||||||
fontFamily: 'BalsamiqSans'),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
sliderItem('Home', Icons.home),
|
|
||||||
sliderItem('Add Post', Icons.add_circle),
|
|
||||||
sliderItem('Notification', Icons.notifications_active),
|
|
||||||
sliderItem('Likes', Icons.favorite),
|
|
||||||
sliderItem('Setting', Icons.settings),
|
|
||||||
sliderItem('LogOut', Icons.arrow_back_ios)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget sliderItem(String title, IconData icons) => ListTile(
|
|
||||||
title: Text(
|
|
||||||
title,
|
|
||||||
style:
|
|
||||||
TextStyle(color: Colors.black, fontFamily: 'BalsamiqSans_Regular'),
|
|
||||||
),
|
|
||||||
leading: Icon(
|
|
||||||
icons,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
onTap: () {
|
|
||||||
onItemClick!(title);
|
|
||||||
});
|
|
||||||
}
|
|
@ -0,0 +1,52 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SliderAppBar {
|
||||||
|
/// [double] you can change appBar height by this parameter [appBarHeight]
|
||||||
|
///
|
||||||
|
final double appBarHeight;
|
||||||
|
|
||||||
|
/// [Widget] you can set appbar title by this parameter [title]
|
||||||
|
///
|
||||||
|
final Widget title;
|
||||||
|
|
||||||
|
///[bool] you can set title in center by this parameter
|
||||||
|
/// By default it's [true]
|
||||||
|
///
|
||||||
|
final bool isTitleCenter;
|
||||||
|
|
||||||
|
///[Color] you can change appbar color by this parameter [appBarColor]
|
||||||
|
///
|
||||||
|
final Color appBarColor;
|
||||||
|
|
||||||
|
///[EdgeInsets] you can change appBarPadding by this parameter [appBarPadding]
|
||||||
|
///
|
||||||
|
final EdgeInsets? appBarPadding;
|
||||||
|
|
||||||
|
///[Widget] you can set trailing of appbar by this parameter [trailing]
|
||||||
|
///
|
||||||
|
final Widget? trailing;
|
||||||
|
|
||||||
|
///[Color] you can change drawer icon by this parameter [drawerIconColor]
|
||||||
|
///
|
||||||
|
final Color drawerIconColor;
|
||||||
|
|
||||||
|
///[Widget] you can change drawer icon by this parameter [drawerIcon]
|
||||||
|
///
|
||||||
|
final Widget? drawerIcon;
|
||||||
|
|
||||||
|
///[double] you can change drawer icon size by this parameter [drawerIconSize]
|
||||||
|
///
|
||||||
|
final double drawerIconSize;
|
||||||
|
|
||||||
|
const SliderAppBar({
|
||||||
|
this.appBarHeight = 70,
|
||||||
|
this.title = const Text('AppBar'),
|
||||||
|
this.isTitleCenter = true,
|
||||||
|
this.appBarColor = Colors.white,
|
||||||
|
this.appBarPadding = const EdgeInsets.only(top: 24),
|
||||||
|
this.trailing,
|
||||||
|
this.drawerIconColor = Colors.black,
|
||||||
|
this.drawerIcon,
|
||||||
|
this.drawerIconSize = 27,
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SliderShadow {
|
||||||
|
final Color shadowColor;
|
||||||
|
|
||||||
|
///[double] you can change blurRadius of shadow by this parameter [shadowBlurRadius]
|
||||||
|
///
|
||||||
|
final double shadowBlurRadius;
|
||||||
|
|
||||||
|
///[double] you can change spreadRadius of shadow by this parameter [shadowSpreadRadius]
|
||||||
|
///
|
||||||
|
final double shadowSpreadRadius;
|
||||||
|
|
||||||
|
SliderShadow(
|
||||||
|
{this.shadowColor = Colors.grey,
|
||||||
|
this.shadowBlurRadius = 25.0,
|
||||||
|
this.shadowSpreadRadius = 5.0});
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 3.2 MiB |
Binary file not shown.
After Width: | Height: | Size: 148 KiB |
Binary file not shown.
After Width: | Height: | Size: 137 KiB |
Loading…
Reference in New Issue