Skip to content
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
12 changes: 6 additions & 6 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TaskistApp extends StatelessWidget {
home: HomePage(
user: _currentUser,
),
theme: new ThemeData(primarySwatch: Colors.blue),
theme: ThemeData(primarySwatch: Colors.blue),
);
}
}
Expand Down Expand Up @@ -70,12 +70,12 @@ class _HomePageState extends State<HomePage>
fixedColor: Colors.deepPurple,
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: new Icon(FontAwesomeIcons.calendarCheck),
title: new Text("")),
icon: Icon(FontAwesomeIcons.calendarCheck),
title: Text("")),
BottomNavigationBarItem(
icon: new Icon(FontAwesomeIcons.calendar), title: new Text("")),
icon: Icon(FontAwesomeIcons.calendar), title: Text("")),
BottomNavigationBarItem(
icon: new Icon(FontAwesomeIcons.slidersH), title: new Text(""))
icon: Icon(FontAwesomeIcons.slidersH), title: Text(""))
],
),
body: _children[_currentIndex],
Expand All @@ -102,4 +102,4 @@ class _HomePageState extends State<HomePage>
_currentIndex = index;
});
}
}
}
50 changes: 25 additions & 25 deletions lib/ui/page_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ class _TaskPageState extends State<TaskPage>
),
Expanded(
flex: 2,
child: new Row(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Task',
style: new TextStyle(
style: TextStyle(
fontSize: 30.0, fontWeight: FontWeight.bold),
),
Text(
'Lists',
style: new TextStyle(
style: TextStyle(
fontSize: 28.0, color: Colors.grey),
)
],
Expand All @@ -71,16 +71,16 @@ class _TaskPageState extends State<TaskPage>
),
Padding(
padding: EdgeInsets.only(top: 50.0),
child: new Column(
child: Column(
children: <Widget>[
new Container(
Container(
width: 50.0,
height: 50.0,
decoration: new BoxDecoration(
border: new Border.all(color: Colors.black38),
decoration: BoxDecoration(
border: Border.all(color: Colors.black38),
borderRadius: BorderRadius.all(Radius.circular(7.0))),
child: new IconButton(
icon: new Icon(Icons.add),
child: IconButton(
icon: Icon(Icons.add),
onPressed: _addTaskPressed,
iconSize: 30.0,
),
Expand All @@ -104,19 +104,19 @@ class _TaskPageState extends State<TaskPage>
onNotification: (overscroll) {
overscroll.disallowGlow();
},
child: new StreamBuilder<QuerySnapshot>(
child: StreamBuilder<QuerySnapshot>(
stream: Firestore.instance
.collection(widget.user.uid)
.orderBy("date", descending: true)
.snapshots(),
builder: (BuildContext context,
AsyncSnapshot<QuerySnapshot> snapshot) {
if (!snapshot.hasData)
return new Center(
return Center(
child: CircularProgressIndicator(
backgroundColor: Colors.blue,
));
return new ListView(
return ListView(
physics: const BouncingScrollPhysics(),
padding: EdgeInsets.only(left: 40.0, right: 40.0),
scrollDirection: Axis.horizontal,
Expand All @@ -140,7 +140,7 @@ class _TaskPageState extends State<TaskPage>
List<ElementTask> listElement = new List(), listElement2;
Map<String, List<ElementTask>> userMap = new Map();

List<String> cardColor = new List();
List<String> cardColor = List();

if (widget.user.uid.isNotEmpty) {
cardColor.clear();
Expand All @@ -149,13 +149,13 @@ class _TaskPageState extends State<TaskPage>
String color;
f.data.forEach((a, b) {
if (b.runtimeType == bool) {
listElement.add(new ElementTask(a, b));
listElement.add(ElementTask(a, b));
}
if (b.runtimeType == String && a == "color") {
color = b;
}
});
listElement2 = new List<ElementTask>.from(listElement);
listElement2 = List<ElementTask>.from(listElement);
for (int i = 0; i < listElement2.length; i++) {
if (listElement2.elementAt(i).isDone == false) {
userMap[f.documentID] = listElement2;
Expand All @@ -170,21 +170,21 @@ class _TaskPageState extends State<TaskPage>
listElement.clear();
}).toList();

return new List.generate(userMap.length, (int index) {
return new GestureDetector(
return List.generate(userMap.length, (int index) {
return GestureDetector(
onTap: () {
Navigator.of(context).push(
new PageRouteBuilder(
pageBuilder: (_, __, ___) => new DetailPage(
PageRouteBuilder(
pageBuilder: (_, __, ___) => DetailPage(
user: widget.user,
i: index,
currentList: userMap,
color: cardColor.elementAt(index),
),
transitionsBuilder:
(context, animation, secondaryAnimation, child) =>
new ScaleTransition(
scale: new Tween<double>(
ScaleTransition(
scale: Tween<double>(
begin: 1.5,
end: 1.0,
).animate(
Expand Down Expand Up @@ -339,12 +339,12 @@ class _TaskPageState extends State<TaskPage>

void _addTaskPressed() async {
Navigator.of(context).push(
new PageRouteBuilder(
pageBuilder: (_, __, ___) => new NewTaskPage(
PageRouteBuilder(
pageBuilder: (_, __, ___) => NewTaskPage(
user: widget.user,
),
transitionsBuilder: (context, animation, secondaryAnimation, child) =>
new ScaleTransition(
ScaleTransition(
scale: new Tween<double>(
begin: 1.5,
end: 1.0,
Expand Down Expand Up @@ -381,7 +381,7 @@ class _TaskPageState extends State<TaskPage>
}

Padding _getToolbar(BuildContext context) {
return new Padding(
return Padding(
padding: EdgeInsets.only(top: 50.0, left: 20.0, right: 20.0),
child:
new Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Expand Down