diff --git a/lib/main.dart b/lib/main.dart index a7c26b9..3e4ea94 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,7 +40,7 @@ class TaskistApp extends StatelessWidget { home: HomePage( user: _currentUser, ), - theme: new ThemeData(primarySwatch: Colors.blue), + theme: ThemeData(primarySwatch: Colors.blue), ); } } @@ -70,12 +70,12 @@ class _HomePageState extends State fixedColor: Colors.deepPurple, items: [ 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], @@ -102,4 +102,4 @@ class _HomePageState extends State _currentIndex = index; }); } -} \ No newline at end of file +} diff --git a/lib/ui/page_task.dart b/lib/ui/page_task.dart index d3a7389..82aba74 100644 --- a/lib/ui/page_task.dart +++ b/lib/ui/page_task.dart @@ -44,17 +44,17 @@ class _TaskPageState extends State ), Expanded( flex: 2, - child: new Row( + child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ 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), ) ], @@ -71,16 +71,16 @@ class _TaskPageState extends State ), Padding( padding: EdgeInsets.only(top: 50.0), - child: new Column( + child: Column( children: [ - 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, ), @@ -104,7 +104,7 @@ class _TaskPageState extends State onNotification: (overscroll) { overscroll.disallowGlow(); }, - child: new StreamBuilder( + child: StreamBuilder( stream: Firestore.instance .collection(widget.user.uid) .orderBy("date", descending: true) @@ -112,11 +112,11 @@ class _TaskPageState extends State builder: (BuildContext context, AsyncSnapshot 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, @@ -140,7 +140,7 @@ class _TaskPageState extends State List listElement = new List(), listElement2; Map> userMap = new Map(); - List cardColor = new List(); + List cardColor = List(); if (widget.user.uid.isNotEmpty) { cardColor.clear(); @@ -149,13 +149,13 @@ class _TaskPageState extends State 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.from(listElement); + listElement2 = List.from(listElement); for (int i = 0; i < listElement2.length; i++) { if (listElement2.elementAt(i).isDone == false) { userMap[f.documentID] = listElement2; @@ -170,12 +170,12 @@ class _TaskPageState extends State 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, @@ -183,8 +183,8 @@ class _TaskPageState extends State ), transitionsBuilder: (context, animation, secondaryAnimation, child) => - new ScaleTransition( - scale: new Tween( + ScaleTransition( + scale: Tween( begin: 1.5, end: 1.0, ).animate( @@ -339,12 +339,12 @@ class _TaskPageState extends State 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( begin: 1.5, end: 1.0, @@ -381,7 +381,7 @@ class _TaskPageState extends State } 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: [