Skip to content

Commit

Permalink
Updated drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
cyblogerz committed Aug 6, 2022
1 parent 2b63e97 commit b32d7e3
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 13 deletions.
48 changes: 47 additions & 1 deletion lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,53 @@ class _HomeState extends State<Home> {
],
),
backgroundColor: Colors.white,
drawer: Drawer(),
drawer: Drawer(
child: Column(
children: <Widget>[
UserAccountsDrawerHeader(
decoration: BoxDecoration(color: Colors.pink),
currentAccountPicture: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.network(
'https://avatars.githubusercontent.com/u/74711322?v=4'),
),
accountName: Text('NewUser'),
accountEmail: Text('userNew@email.com')),
ListTile(
onTap: () {},
leading: Icon(
Icons.info_outline_rounded,
size: 25,
),
title: Text('About'),
),
ListTile(
onTap: () {},
leading: Icon(
Icons.catching_pokemon_rounded,
size: 25,
),
title: Text('View Project on Github'),
),
ListTile(
onTap: () {},
leading: Icon(
Icons.change_circle_outlined,
size: 25,
),
title: Text('ChangeLogs'),
),
ListTile(
onTap: () {},
leading: Icon(
Icons.bug_report,
size: 25,
),
title: Text('Bug Reports'),
)
],
),
),
appBar: AppBar(
// automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.black),
Expand Down
15 changes: 9 additions & 6 deletions lib/pages/splash_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,20 @@ class _SplashState extends State<Splash> {
bookData.addnovels();
Navigator.pushNamed(context, Home.id);
});
Timer(
Duration(seconds: 3),
() => Navigator.pushReplacement(
context, MaterialPageRoute(builder: (context) => Home())));
}

@override
Widget build(BuildContext context) {
Timer(
Duration(seconds: 3),
() => Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (BuildContext context) => Home())));
return Scaffold(
body: Center(
child: CircularProgressIndicator(),
));
child: Icon(
Icons.bolt,
color: Colors.yellow,
size: 100,
)));
}
}
2 changes: 0 additions & 2 deletions lib/utils/book_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import 'dart:convert';

// import 'package:dio/dio.dart';

import '../models/book.dart';
import 'package:http/http.dart' as http;

Expand Down
1 change: 0 additions & 1 deletion lib/utils/pdf_api.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:file_picker/file_picker.dart';
import 'package:zippy/pages/result_list.dart';

Future pickFile() async {
final res = await FilePicker.platform.pickFiles(
Expand Down
3 changes: 0 additions & 3 deletions lib/widgets/alert.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import 'package:flutter/material.dart';

showAlertDialog(BuildContext context) {
// Create button
Widget okButton = ElevatedButton(
child: Text("OK"),
onPressed: () {
Navigator.of(context).pop();
},
);

// Create AlertDialog
AlertDialog downloadAlert = AlertDialog(
title: Text("Important Notice"),
content: Text(
Expand All @@ -19,7 +17,6 @@ showAlertDialog(BuildContext context) {
],
);

// show the dialog
showDialog(
context: context,
builder: (BuildContext context) {
Expand Down

0 comments on commit b32d7e3

Please sign in to comment.