Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
FulcrumTestFlight committed Nov 30, 2018
2 parents aeff3d4 + 4f0cf66 commit 8e336f7
Show file tree
Hide file tree
Showing 17 changed files with 790 additions and 863 deletions.
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ android {
applicationId "com.groovinchip.flutter.callmanager"
minSdkVersion 16
targetSdkVersion 27
versionCode 9
versionName "1.4"
versionCode 13
versionName "1.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
//setProperty("archivesBaseName", applicationId + "_" + versionName)
}

signingConfigs {
Expand Down
Binary file added assets/glogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
532 changes: 0 additions & 532 deletions lib/HomeScreen.dart

This file was deleted.

2 changes: 1 addition & 1 deletion lib/aboutScreen.dart → lib/about_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class _AboutScreenState extends State<AboutScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
backgroundColor: Theme.of(context).canvasColor,
body: SafeArea(
child: SingleChildScrollView(
child: Center(
Expand Down
49 changes: 17 additions & 32 deletions lib/AddNewCallScreen.dart → lib/add_new_call_screen.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dart:async';
import 'package:call_manager/lnp.dart';
import 'package:call_manager/pass_notification.dart';
import 'package:flutter/material.dart';
import 'package:contact_picker/contact_picker.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -45,7 +45,7 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
backgroundColor: Theme.of(context).canvasColor,
body: SafeArea(
child: ListView(
children: <Widget>[
Expand Down Expand Up @@ -76,21 +76,17 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
labelText: 'Name (Required)',
),
),
trailing: Material(
child: IconButton(
icon: Icon(Icons.contacts),
onPressed: () async {
Contact contact = await _contactPicker.selectContact();
setState(() {
_contact = contact;
_nameFieldController.text = _contact.fullName;
_phoneFieldController.text = _contact.phoneNumber.number;
});
},
),
color: Color(0xFFE0E0E0),
elevation: 2.0,
borderRadius: BorderRadius.all(Radius.circular(5.0)),
trailing: IconButton(
icon: Icon(Icons.contacts),
onPressed: () async {
Contact contact = await _contactPicker.selectContact();
setState(() {
_contact = contact;
_nameFieldController.text = _contact.fullName;
_phoneFieldController.text = _contact.phoneNumber.number;
});
},
tooltip: "Choose from Contacts",
),
),
ListTile(
Expand Down Expand Up @@ -124,9 +120,7 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
Padding(
padding:
const EdgeInsets.only(right: 16.0, left: 16.0, top: 12.0),
child: Divider(
color: Colors.black,
),
child: Divider(),
),
Row(
children: <Widget>[
Expand Down Expand Up @@ -220,7 +214,7 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
NotificationDetails platformChannelSpecifics = new NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);

await LNP.of(context).schedule(
await PassNotification.of(context).schedule(
0,
'Call Reminder',
"Don't forget to call " + _nameFieldController.text + "!",
Expand Down Expand Up @@ -259,16 +253,8 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
);
}
),
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.grey[200],
spreadRadius: 3.0,
)
],
),
child: BottomAppBar(
//hasNotch: false,
child: Row(
Expand All @@ -281,7 +267,6 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
onPressed: () {
Navigator.pop(context);
},
color: Colors.black,
),
),
],
Expand All @@ -290,4 +275,4 @@ class _AddNewCallScreenState extends State<AddNewCallScreen> {
),
);
}
}
}
166 changes: 166 additions & 0 deletions lib/bottom_sheets.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
import 'package:call_manager/about_screen.dart';
import 'package:call_manager/utils/page_transitions.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:dynamic_theme/dynamic_theme.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:groovin_material_icons/groovin_material_icons.dart';
import 'package:modal_drawer_handle/modal_drawer_handle.dart';
import 'package:rounded_modal/rounded_modal.dart';
import 'package:call_manager/globals.dart' as globals;

class BottomSheets {
BuildContext context;

BottomSheets(this.context);

void changeBrightness() {
DynamicTheme.of(context).setBrightness(Theme.of(context).brightness == Brightness.dark? Brightness.light: Brightness.dark);
}

void showBottomAppBarSheet() {
showRoundedModalBottomSheet(
color: Theme.of(context).canvasColor,
context: context,
builder: (builder){
return Container(
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: ModalDrawerHandle(),
),
ListTile(
leading: CircleAvatar(
child: Text(globals.loggedInUser.displayName[0], style: TextStyle(color: Colors.white),),
backgroundColor: Colors.blue[700],
),
title: Text(globals.loggedInUser.displayName),
subtitle: Text(globals.loggedInUser.email),
/*leading: Icon(Icons.account_circle, size: 45.0,),
title: Text(globals.loggedInUser.displayName),
subtitle: Text(globals.loggedInUser.email),*/
),
Divider(
color: Colors.grey,
height: 0.0,
),
Material(
child: ListTile(
title: Text("Delete All Calls"),
leading: Icon(Icons.clear_all),
onTap: () {
Navigator.pop(context);
showDialog(
context: context,
builder: (_) => AlertDialog(
title: Text("Delete All Calls"),
content: Text("Are you sure you want to delete all calls? This cannot be undone."),
actions: <Widget>[
FlatButton(
onPressed: (){
Navigator.pop(context);
},
child: Text("No"),
),
FlatButton(
onPressed: () async {
Navigator.pop(context);
CollectionReference ref = Firestore.instance.collection("Users").document(globals.loggedInUser.uid).collection("Calls");
QuerySnapshot s = await ref.getDocuments();
if(s.documents.length == 0){
final snackBar = SnackBar(
content: Text("There are no calls to delete"),
action: SnackBarAction(
label: 'Dismiss',
onPressed: () {

}
),
duration: Duration(seconds: 3),
);
Scaffold.of(context).showSnackBar(snackBar);
} else {
for(int i = 0; i < s.documents.length; i++) {
DocumentReference d = s.documents[i].reference;
d.delete();
}
}
},
child: Text("Yes"),
),
],
),
);
},
),
),
Material(
child: ListTile(
leading: Icon(Icons.brightness_6),
title: Text("Toggle Dark Theme"),
onTap: () {
changeBrightness();
Navigator.pop(context);
},
),
),
Material(
child: ListTile(
title: Text("Log Out"),
leading: Icon(GroovinMaterialIcons.logout),
onTap: (){
Navigator.pop(context);
showDialog(
context: context,
builder: (_) => AlertDialog(
title: Text("Log Out"),
content: Text("Are you sure you want to log out?"),
actions: <Widget>[
FlatButton(
onPressed: (){
Navigator.pop(context);
},
child: Text("No"),
),
FlatButton(
onPressed: (){
FirebaseAuth.instance.signOut();
Navigator.of(context).pushNamedAndRemoveUntil('/',(Route<dynamic> route) => false);
},
child: Text("Yes"),
),
],
),
);
},
),
),
Divider(
color: Colors.grey,
height: 0.0,
),
Material(
child: ListTile(
title: Text("About"),
leading: Icon(Icons.info_outline),
onTap: (){
Navigator.pop(context);
//Navigator.of(context).pushNamed("/AboutScreen");
Navigator.push(
context,
SlideLeftRoute(widget: AboutScreen())
);
},
),
),
],
),
),
);
}
);
}
}
Loading

0 comments on commit 8e336f7

Please sign in to comment.