Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Speaker page and minor improvements #6

Merged
merged 2 commits into from Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions android/.project
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions android/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1
6 changes: 6 additions & 0 deletions android/app/.classpath
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-12/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
23 changes: 23 additions & 0 deletions android/app/.project
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment>Project app created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions android/app/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
4 changes: 4 additions & 0 deletions android/app/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=13
org.eclipse.jdt.core.compiler.compliance=13
org.eclipse.jdt.core.compiler.source=13
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Expand Up @@ -8,7 +8,7 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="organizers_app"
android:label="DevFest GNR Admin"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/main.dart
Expand Up @@ -8,7 +8,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.light(),
theme: ThemeData.dark(),
home: SignIn(),
);
}
Expand Down
14 changes: 2 additions & 12 deletions lib/signin/signIn.dart
Expand Up @@ -11,7 +11,7 @@ class SignIn extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("DevFestGnr 2k19"),
title: Text("DevFest Dashboard"),
),
body: StreamBuilder<FirebaseUser>(
stream: FirebaseAuth.instance.onAuthStateChanged,
Expand All @@ -29,6 +29,7 @@ class SignIn extends StatelessWidget {
child: Text("Sign In"),
onPressed: () async {
FirebaseUser user = await _handleGoogleSignIn();
print(user);
// setBasicData(user);
},
),
Expand All @@ -52,15 +53,4 @@ class SignIn extends StatelessWidget {
FirebaseUser user = authResult.user;
return user;
}

// void setBasicData(FirebaseUser user) async {
// await Firestore.instance.collection('users').document(user.email).setData(
// {
// "display_name": user.displayName,
// "email": user.email,
// "uid": user.uid,
// "photo_url": user.photoUrl,
// },
// );
// }
}
82 changes: 46 additions & 36 deletions lib/speakers/speaker_page.dart
@@ -1,3 +1,4 @@
import 'dart:math';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
Expand All @@ -11,7 +12,7 @@ class SpeakerPage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Speakers"),
title: Text("Speakers Settings"),
),
body: StreamBuilder<DocumentSnapshot>(
stream: Firestore.instance
Expand Down Expand Up @@ -49,9 +50,9 @@ class SpeakerPage extends StatelessWidget {
shrinkWrap: true,
itemBuilder: (c, i) {
return Card(
elevation: 0.0,
elevation: 5.0,
child: Padding(
padding: const EdgeInsets.all(12.0),
padding: const EdgeInsets.all(7.0),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Expand Down Expand Up @@ -90,47 +91,56 @@ class SpeakerPage extends StatelessWidget {
width: MediaQuery.of(context).size.width *
0.2,
height: 5,
color: Colors.red,
color: Colors.primaries[Random()
.nextInt(Colors.primaries.length)],
),
],
),
SizedBox(
height: 10,
),
Text(
speakerList[i].speakerDesc,
style: Theme.of(context).textTheme.subtitle,
),
SizedBox(
height: 10,
height: 3,
),
Text(
speakerList[i].speakerSession,
style: Theme.of(context).textTheme.caption,
),
CheckboxListTile(
value: speakerList[i].isShown ?? false,
title: Text("Is Visible"),
onChanged: (value) {
return isShownConfirmation(
context: context,
i: i,
snapshot: snapshot,
turnOn: value,
);
},
Row(
children: <Widget>[
Text("Visibility "),
Switch(
value: speakerList[i].isShown ?? false,
onChanged: (value) {
return isShownConfirmation(
context: context,
i: i,
snapshot: snapshot,
turnOn: value,
);
}),
SizedBox(width: 5),
Icon(speakerList[i].isShown
? Icons.visibility
: Icons.visibility_off),
],
),
CheckboxListTile(
value: speakerList[i].isFeatured ?? false,
title: Text("Is Featured"),
onChanged: (value) {
return isFeaturedConfirmation(
context: context,
i: i,
snapshot: snapshot,
turnOn: value,
);
},
Row(
children: <Widget>[
Text("Featured"),
Switch(
value: speakerList[i].isFeatured ?? false,
onChanged: (value) {
return isFeaturedConfirmation(
context: context,
i: i,
snapshot: snapshot,
turnOn: value,
);
},
),
SizedBox(width: 5),
Icon(speakerList[i].isFeatured
? Icons.star
: Icons.star_border),
],
),
],
),
Expand Down Expand Up @@ -169,7 +179,7 @@ class SpeakerPage extends StatelessWidget {
actions: <Widget>[
FlatButton(
child: Text("Yes"),
//this is where the actual magic✨(overwriting) happens
// this is where the actual magic✨(overwriting) happens
onPressed: () async {
//if turnOn is true, we need to turn the isShown on
speakerList[i].isShown = turnOn ? true : false;
Expand Down Expand Up @@ -226,7 +236,7 @@ class SpeakerPage extends StatelessWidget {
actions: <Widget>[
FlatButton(
child: Text("Yes"),
//this is where the actual magic✨(overwriting) happens
// this is where the actual magic✨(overwriting) happens
onPressed: () async {
//if turnOn is true, we need to turn the isShown on
speakerList[i].isFeatured = turnOn ? true : false;
Expand Down
65 changes: 64 additions & 1 deletion pubspec.lock
@@ -1,6 +1,20 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.10"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -36,6 +50,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -62,6 +90,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
name: flutter_launcher_icons
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.3"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -74,6 +109,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.7"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -102,6 +144,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -170,6 +219,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
sdks:
dart: ">=2.2.2 <3.0.0"
dart: ">=2.4.0 <3.0.0"
flutter: ">=1.5.0 <2.0.0"
5 changes: 5 additions & 0 deletions pubspec.yaml
Expand Up @@ -30,8 +30,13 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: "^0.7.0"


flutter_icons:
android: true
image_path: "assets/icon.png"

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

Expand Down