Skip to content

Implement notice compose screen #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\softwares\Flutter\flutter_windows_v1.5.4-hotfix.2-stable\flutter"
export "FLUTTER_APPLICATION_PATH=D:\projects\traintracker"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_FRAMEWORK_DIR=D:\softwares\Flutter\flutter_windows_v1.5.4-hotfix.2-stable\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
57 changes: 57 additions & 0 deletions lib/content_screen/contribution_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:trainfinder/widgets/text_form_field.dart';

class Contribution extends StatefulWidget {
@override
_ContributionState createState() => _ContributionState();
}

class _ContributionState extends State<Contribution> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Contribution(),
floatingActionButton: FloatingActionButton.extended(
icon: Icon(FontAwesomeIcons.ad),
onPressed: () {},
label: Text("Add"),
),
);
}

Widget Contribution() {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 40,
),
Center(
child: Text(
"Contribute",
style: TextStyle(
fontSize: 40,
color: Colors.teal,
fontWeight: FontWeight.bold),
),
),
SizedBox(
height: 20,
),
LabelTextField(
hintText: "Train name",
labelText: "Train name",
),
SizedBox(
height: 10,
),
LabelTextField(
hintText: "Train time",
labelText: "Train time",
)
],
),
);
}
}
114 changes: 114 additions & 0 deletions lib/content_screen/notices_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:trainfinder/widgets/text_form_field.dart';

class NoticesScreen extends StatefulWidget {
@override
_NoticesScreenState createState() => _NoticesScreenState();
}

class _NoticesScreenState extends State<NoticesScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Notices(),
floatingActionButton: FloatingActionButton.extended(
icon: Icon(FontAwesomeIcons.ad),
onPressed: () {
Navigator.push(context,
MaterialPageRoute(builder: (context) => ComposeNotice()));
},
label: Text("Compose notice"),
),
);
}

Widget Notices() {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 60,
),
Row(
children: <Widget>[
Text(
"Ruhunu kumari",
style: TextStyle(
fontSize: 20,
color: Colors.teal,
fontWeight: FontWeight.bold),
)
],
),
Card(
child: ListTile(
leading: Icon(FontAwesomeIcons.fileImport),
title: Text("Ruhunu kumari will be delayed 10 minutes today"),
),
),
],
),
);
}
}

class ComposeNotice extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: _composeNotice(),
);
}

Widget _composeNotice() {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 40,
),
LabelTextField(
hintText: "Train name",
labelText: "Train name",
),
SizedBox(
height: 20,
),
LabelTextField(
hintText: "Notice massage",
labelText: "Notice massage",
),
SizedBox(
height: 20,
),
LabelTextField(
hintText: "Current Station",
labelText: "Current Station",
),
SizedBox(
height: 20,
),
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 100),
),
ButtonTheme(
minWidth: 200,
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)
),
color: Colors.teal,
onPressed: () {},
child: Text("Submit notice"),
),
),
],
)
],
),
);
}
}
172 changes: 172 additions & 0 deletions lib/content_screen/search_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:scaffold_tab_bar/scaffold_tab_bar.dart';
import 'package:trainfinder/widgets/text_form_field.dart';

class SearchScreen extends StatefulWidget {
@override
_SearchScreenState createState() => _SearchScreenState();
}

class _SearchScreenState extends State<SearchScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: ScaffoldTabBar(
children: [
ScreenTab(
screen: _search(),
tab: BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.times),
title: Text('Time table'),
),
),
ScreenTab(
screen: _timeTable(),
tab: BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.search),
title: Text('Search'),
),
),
],
));
}

Widget _timeTable() {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 60,
),
Center(
child: Text(
"Find Train Schedule",
style: TextStyle(
fontSize: 40,
color: Colors.teal,
fontWeight: FontWeight.bold),
),
),
SizedBox(
height: 50,
),
LabelTextField(
labelText: "From where",
hintText: "From where",
),
SizedBox(
height: 20,
),
LabelTextField(
labelText: "To where",
hintText: "To where",
),
Row(
children: <Widget>[
Align(
alignment: Alignment.centerLeft,
child: IconButton(
onPressed: () {},
icon: Icon(
Icons.swap_vert,
color: Colors.teal,
),
),
),
Text("swap"),
Padding(
padding: EdgeInsets.only(left: 220),
),
Align(
alignment: Alignment.bottomRight,
child: IconButton(
icon: Icon(FontAwesomeIcons.dropbox),
onPressed: () {},
),
),
Text("more")
],
),
SizedBox(
height: 20,
),
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 40),
),
ButtonTheme(
minWidth: MediaQuery.of(context).size.width * 0.8,
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
onPressed: () {},
child: Text("Submit"),
color: Colors.teal,
),
),
],
)
],
),
);
}

Widget _search() {
return Container(
child: Column(
children: <Widget>[
SizedBox(
height: 60,
),
Center(
child: Text(
"Station Time Table",
style: TextStyle(
fontSize: 40,
color: Colors.teal,
fontWeight: FontWeight.bold),
),
),
SizedBox(
height: 50,
),
LabelTextField(
hintText: "Station Name",
labelText: "Station Name",
),
Row(
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 300),
),
Align(
alignment: Alignment.centerRight,
child: IconButton(
icon: Icon(Icons.more),
onPressed: () {},
),
),
Text("more"),
SizedBox(
height: 10,
),
],
),
ButtonTheme(
minWidth: 300,
child: RaisedButton(
child: Text("Search"),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)
),
color: Colors.teal,
onPressed: (){},
),
),
],
),
);
}
}
Loading