From 6da5aac636b60cfc99460ae10970137f1a8d1275 Mon Sep 17 00:00:00 2001 From: Sakuni Date: Sat, 30 May 2020 10:22:59 +0530 Subject: [PATCH] User management ui to be modified further --- lib/UserManagementAdmin/Admins.dart | 11 ++ lib/UserManagementAdmin/Block.dart | 11 ++ lib/UserManagementAdmin/CrewMembers.dart | 11 ++ .../UserManagementAdmin.dart | 162 +++++++++++++++++- 4 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 lib/UserManagementAdmin/Admins.dart create mode 100644 lib/UserManagementAdmin/Block.dart create mode 100644 lib/UserManagementAdmin/CrewMembers.dart diff --git a/lib/UserManagementAdmin/Admins.dart b/lib/UserManagementAdmin/Admins.dart new file mode 100644 index 0000000..a66a274 --- /dev/null +++ b/lib/UserManagementAdmin/Admins.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class Admins extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Center( + child: Text('existing admins'), + ); + throw UnimplementedError(); + } +} \ No newline at end of file diff --git a/lib/UserManagementAdmin/Block.dart b/lib/UserManagementAdmin/Block.dart new file mode 100644 index 0000000..9ef72b0 --- /dev/null +++ b/lib/UserManagementAdmin/Block.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class Block extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Center( + child: Text('block users'), + ); + throw UnimplementedError(); + } +} \ No newline at end of file diff --git a/lib/UserManagementAdmin/CrewMembers.dart b/lib/UserManagementAdmin/CrewMembers.dart new file mode 100644 index 0000000..8547953 --- /dev/null +++ b/lib/UserManagementAdmin/CrewMembers.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class CrewMembers extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Center( + child: Text('existing members'), + ); + throw UnimplementedError(); + } +} \ No newline at end of file diff --git a/lib/UserManagementAdmin/UserManagementAdmin.dart b/lib/UserManagementAdmin/UserManagementAdmin.dart index 05e9122..d2cae67 100644 --- a/lib/UserManagementAdmin/UserManagementAdmin.dart +++ b/lib/UserManagementAdmin/UserManagementAdmin.dart @@ -1,11 +1,169 @@ import 'package:flutter/material.dart'; +import './CrewMembers.dart'; +import './Admins.dart'; +import './Block.dart'; + class UserManagementAdmin extends StatelessWidget { @override Widget build(BuildContext context) { - return Center( - child: Text('Sakuni'), + return MaterialApp( + title: 'Manage Users', + debugShowCheckedModeBanner: false, + home: Home(), + theme: ThemeData( + brightness: Brightness.dark, + primaryColor: Colors.cyan, + accentColor: Colors.indigoAccent), + ); + throw UnimplementedError(); + } +} + +class Home extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Manage Users'), + ), + body: Center( + child: Container( + padding: EdgeInsets.only(left: 10.0, top: 40.0), + alignment: Alignment.center, + color: Colors.white, + child: Column( + children: [ + AdminButton(), + CrewButton(), + BlockButton(), + ], + ), + ), + ), + ); + + throw UnimplementedError(); + } +} + +class AdminButton extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.only(top: 30.0), + width: 250.0, + height: 50.0, + child: RaisedButton( + textColor: Colors.white, + child: Container( + decoration: const BoxDecoration ( + color: Colors.blue, + ), + child: Text( + "Admins", + style: TextStyle(fontSize: 20.0, color: Colors.white), + ), + ), + elevation: 6.0, + onPressed: () { + Navigator.push(context, MaterialPageRoute(builder: (context) { + return Admins(); + })); + }, //onpressed + ), + ); + throw UnimplementedError(); + } +} + +class CrewButton extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.only(top: 30.0), + width: 250.0, + height: 50.0, + child: RaisedButton( + textColor: Colors.white, + child: Container( + decoration: const BoxDecoration ( + color: Colors.blue, + ), + child: Text( + "Crew Members", + style: TextStyle(fontSize: 20.0, color: Colors.white), + ), + ), + elevation: 6.0, + onPressed: () { + Navigator.push(context, MaterialPageRoute(builder: (context) { + return CrewMembers(); + })); + }, //onpressed + ), + ); + throw UnimplementedError(); + } +} + +class BlockButton extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.only(top: 30.0), + width: 250.0, + height: 50.0, + child: RaisedButton( + color: Colors.red, + textColor: Colors.white, + child: Container( + decoration: const BoxDecoration ( + color: Colors.red, + ), + child: Text( + "Block Users", + style: TextStyle(fontSize: 20.0, color: Colors.white), + ), + ), + elevation: 6.0, + onPressed: () { + Navigator.push(context, MaterialPageRoute(builder: (context) { + return Block(); + })); + }, //onpressed + ), ); throw UnimplementedError(); } } + +/*class Home extends StatelessWidget { + @override + Widget build(BuildContext context){ + return Scaffold( + appBar: AppBar( + title: Text('Manage Users'), + centerTitle: true, + backgroundColor: Colors.blue[600], + ), + body: Center( + child: Text('hello', + style: TextStyle( + fontSize: 20.0, + fontWeight: FontWeight.bold, + letterSpacing: 2.0, + color: Colors.grey[600], + + ), + ), + + ), + floatingActionButton: FloatingActionButton( + onPressed: () {}, + child: Text('click '), + backgroundColor: Colors.red[600], + ), + ); + } +}*/