110 lines
3.6 KiB
Dart
110 lines
3.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'User.dart' as User;
|
|
import 'main.dart';
|
|
class Projects extends StatefulWidget {
|
|
const Projects({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<Projects> createState() => _ProjectsState();
|
|
}
|
|
|
|
class _ProjectsState extends State<Projects> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SafeArea(child: Scaffold(
|
|
floatingActionButton: FloatingActionButton.extended(
|
|
onPressed: () {
|
|
// Navigator.of(context).push(MaterialPageRoute(builder: (context) => NewTodo())).then((value) => {User.refreshUserData().then((va) => {})});
|
|
},
|
|
label: Text("New Project"),
|
|
icon: Icon(Icons.add)),
|
|
appBar: AppBar(
|
|
title: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Row(children: [Icon(Icons.work_outline_sharp, color: Theme.of(context).primaryColor), SizedBox(width: 10), Text('Projects')]),
|
|
Row(
|
|
children: [
|
|
(User.offline)
|
|
? Icon(Icons.signal_cellular_connected_no_internet_4_bar_outlined)
|
|
: InkWell(
|
|
onTap: () {
|
|
setState(() {
|
|
//LoadStats();
|
|
});
|
|
},
|
|
child: Icon(Icons.refresh, size: 30),
|
|
)
|
|
],
|
|
)
|
|
],
|
|
),
|
|
//Container(color: Colors.red,child: Text("Offline",style:TextStyle(fontSize: 5))),
|
|
],
|
|
)),
|
|
drawer: navDrawer(context, 7),
|
|
body: Container(
|
|
padding: EdgeInsets.all(10),
|
|
child: Column(
|
|
children: [
|
|
ProjectCard('This app'),
|
|
ProjectCard('Sneaky Peaky'),
|
|
ProjectCard('Zombie MP'),
|
|
ProjectCard('Pico pico')
|
|
],
|
|
),
|
|
),
|
|
));
|
|
}
|
|
|
|
Widget ProjectCard(String name){
|
|
return Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children:[
|
|
Expanded(
|
|
child: Card(
|
|
child:InkWell(
|
|
onTap: (){},
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(10.0),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Icon(Icons.work),
|
|
Text(name),
|
|
Container(
|
|
decoration: BoxDecoration(
|
|
color: Colors.green,
|
|
borderRadius: BorderRadius.circular(8)
|
|
),
|
|
child:Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 2),
|
|
child: Text("Work"),
|
|
))
|
|
],
|
|
),
|
|
),
|
|
)
|
|
)
|
|
)
|
|
]
|
|
);
|
|
}
|
|
|
|
Widget prioritySeperator(String text){
|
|
return Padding(
|
|
padding: const EdgeInsets.fromLTRB(15,15,15,0),
|
|
child: Row(
|
|
children: [Text(text,style:TextStyle(fontSize: 18, color: Colors.grey))],
|
|
),
|
|
);
|
|
}
|
|
}
|