NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

import 'package:field/screens/expense.dart';
import 'package:field/shared/constants/color_file.dart';
import 'package:field/shared/constants/widget_constant.dart';
import 'package:flutter/material.dart';

class LeftDrawer extends StatelessWidget {
const LeftDrawer({
Key key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Drawer(
// Add a ListView to the drawer. This ensures the user can scroll
child: Column(
children: <Widget>[
Container(
color: kBlue_AppColor,
height: 320,
child: DrawerHeader(
child: Column(
children: [
Image.asset(
'images/4work_logo.png',
height: kHeight_4WorkLogo,
),
SizedBox(
height: 15,
),
Container(
width: 120,
height: 120,
child: Stack(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: AssetImage('images/elon_musk.jpg'))),
),
Align(
alignment: Alignment.bottomRight,
child: Icon(
Icons.fiber_manual_record,
color: kGreen_AppGreenColor,
size: 35.0,
),
)
],
),
),
SizedBox(
height: 15,
),
Text(
'Elon Musk',
style: TextStyle(fontSize: 22, color: Colors.white),
),
SizedBox(
height: 10,
),
Text(
'RV_2.41',
style: TextStyle(color: Colors.white),
)
],
),
),
),
Container(
height: 300,
child: ListView.builder(
itemBuilder: (BuildContext context, int index) {
return new StuffInTiles(
myTile: listOfTile[index],
buildContext: context,
);
},
itemCount: listOfTile.length,
),
)
],
),
);
}
}

class StuffInTiles extends StatelessWidget {
final MyTile myTile;
final BuildContext buildContext;

StuffInTiles({this.myTile, this.buildContext});

void set() {
print('gcjhsdkbckh');
}

@override
Widget build(BuildContext context) {
return _buildTiles(myTile);
}

Widget _buildTiles(MyTile tile) {
if (tile.children.isEmpty)
return new ListTile(
onTap: () {
switch (tile.title) {
case DrawerConstants.newJob:
{
Navigator.pop(buildContext);
}
break;

case DrawerConstants.staleJobs:
{
print("Good");
}
break;

case DrawerConstants.completeJobs:
{
print("Fair");
}
break;

case DrawerConstants.incompleteJobs:
{
print("Poor");
}
break;

case DrawerConstants.message:
{
print("Fair");
}
break;

case DrawerConstants.expanse:
{
Navigator.push(
buildContext,
MaterialPageRoute(
builder: (context) => ExpensePage(),
),
);
}
break;

default:
{
print("Invalid choice");
}
break;
}
},
title: Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
SizedBox(
width: tile.isExpendedView ? 15.0 : 0.0,
),
tile.icon,
SizedBox(
width: 10,
),
Text(
tile.title,
style: TextStyle(color: Colors.white),
),
],
),
Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
)
],
),
),
);
return new ExpansionTile(
trailing: Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
),
//leading: Icon(Icons.movie),
key: PageStorageKey<MyTile>(tile),
title: Container(
child: Row(
children: [
tile.icon,
SizedBox(
width: 10,
),
Text(tile.title, style: TextStyle(color: Colors.white)),
],
)),
children: tile.children.map(_buildTiles).toList(),
);
}
}

class MyTile {
String title;
Icon icon;
bool isExpendedView;
List<MyTile> children;

MyTile(this.title, this.icon, this.isExpendedView,
[this.children = const <MyTile>[]]);
}

List<MyTile> listOfTile = <MyTile>[
new MyTile(
DrawerConstants.newJob,
Icon(
Icons.account_circle,
color: Colors.white,
),
false),
new MyTile(
DrawerConstants.previousJobs,
Icon(
Icons.account_circle,
color: Colors.white,
),
false,
<MyTile>[
new MyTile(
DrawerConstants.staleJobs,
Icon(
Icons.fiber_manual_record,
color: Colors.white,
),
true),
new MyTile(
DrawerConstants.completeJobs,
Icon(
Icons.fiber_manual_record,
color: Colors.white,
),
true),
new MyTile(
DrawerConstants.incompleteJobs,
Icon(
Icons.fiber_manual_record,
color: Colors.white,
),
true)
]),
new MyTile(
DrawerConstants.message,
Icon(
Icons.message,
color: Colors.white,
),
false),
new MyTile(
DrawerConstants.expanse,
Icon(
Icons.monetization_on,
color: Colors.white,
),
false)
];

class DrawerConstants {
static const String newJob = 'New jobs';
static const String previousJobs = 'Previous Jobs';
static const String staleJobs = 'Stale jobs';
static const String completeJobs = 'Complete jobs';
static const String incompleteJobs = 'Incomplete jobs';
static const String message = 'Message';
static const String expanse = 'Expanse';
}
//
//
//Navigator.push(
//context,
//MaterialPageRoute(
//builder: (context) => ResultsPage(
//bmiResult: calc.calculateBMI(),
//resultText: calc.getResult(),
//interpretation: calc.getInterpretation(),
//),
//),
//);
//},







HomeScreen

// drawer: LeftDrawer(),
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.