├── assets ├── daymode.json ├── images │ ├── banner_dark.jpg │ ├── google_logo.png │ ├── banner_light.jpg │ ├── doodles │ │ ├── Group 60.png │ │ ├── Group 61.png │ │ ├── Path 112.png │ │ ├── Path 127.png │ │ ├── Path 133.png │ │ ├── Path 134.png │ │ ├── Path 135.png │ │ ├── Path 136.png │ │ ├── Ellipse 101.png │ │ └── Ellipse 107.png │ ├── devfest_logo_dark.png │ ├── devfest_logo_light.png │ └── id_card │ │ ├── Asset 10@4x.png │ │ ├── Asset 11@4x.png │ │ ├── Asset 13@4x.png │ │ ├── Asset 14@4x.png │ │ ├── Asset 15@4x.png │ │ ├── Asset 1@4x.png │ │ ├── Asset 3@4x.png │ │ ├── Asset 4@4x.png │ │ ├── Asset 5@4x.png │ │ ├── Asset 6@4x.png │ │ ├── Asset 7@4x.png │ │ ├── Asset 8@4x.png │ │ └── Asset 9@4x.png ├── fonts │ └── GoogleSansRegular.ttf └── nightmode.json ├── android ├── .settings │ └── org.eclipse.buildship.core.prefs ├── app │ ├── .settings │ │ ├── org.eclipse.buildship.core.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── src │ │ ├── main │ │ │ ├── ic_launcher-web.png │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── ic_gdg.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── ic_gdg.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── ic_gdg.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ └── ic_gdg.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ └── ic_gdg.png │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── ic_launcher_round.png │ │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── values │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_devfest │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── bin │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── .classpath │ ├── .project │ ├── proguard-rules.pro │ └── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .project ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── icon.png │ │ │ ├── Icon-77.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76@2x-1.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-83.5@2x-1.png │ │ │ ├── Icon-Small-41.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x.png │ │ │ ├── Icon-Small-40@2x.png │ │ │ ├── Icon-Small-40@3x.png │ │ │ ├── Icon-Notification-1.png │ │ │ ├── Icon-Notification@2x.png │ │ │ ├── Icon-Notification@3x.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x-1.png │ │ │ ├── Icon-Small@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ ├── main.m │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Podfile ├── lib ├── config │ ├── index.dart │ ├── config_bloc.dart │ ├── config_state.dart │ ├── config_event.dart │ └── config_page.dart ├── home │ ├── index.dart │ ├── sponsor.dart │ ├── home_bloc.dart │ ├── home_event.dart │ ├── home_provider.dart │ ├── home_state.dart │ ├── team.dart │ ├── home_screen.dart │ ├── home_page.dart │ ├── home_widgets │ │ ├── home_sliding_panel.dart │ │ └── home_front.dart │ ├── speaker.dart │ └── session.dart ├── network │ ├── index.dart │ ├── i_client.dart │ ├── network_service_response.dart │ ├── firebase_client.dart │ ├── mock_client.dart │ └── rest_client.dart ├── utils │ ├── tools.dart │ ├── simple_bloc.dart │ ├── dependency_injection.dart │ └── devfest.dart ├── faq │ └── faq_page.dart ├── find_devfest │ └── find_devfest_page.dart ├── agenda │ ├── ml_screen.dart │ ├── web_screen.dart │ ├── cloud_screen.dart │ ├── mobile_screen.dart │ ├── session_list.dart │ ├── agenda_page.dart │ └── session_detail.dart ├── dialogs │ ├── dialog_card.dart │ ├── loading_dialog.dart │ ├── dialog_title_message.dart │ └── error_dialog.dart ├── universal │ ├── image_card.dart │ ├── dev_scaffold.dart │ └── profileAvatar.dart ├── main.dart ├── map │ └── map_page.dart ├── sponsors │ └── sponsor_page.dart ├── feedback │ └── feedback_page.dart ├── id │ └── id_page.dart ├── signin │ └── signin_page.dart ├── speakers │ └── speaker_page.dart └── team │ └── team_page.dart ├── test └── api_test.dart ├── LICENSE.md ├── .gitignore ├── README.md └── pubspec.yaml /assets/daymode.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableJetifier=true 3 | android.useAndroidX=true 4 | 5 | -------------------------------------------------------------------------------- /assets/images/banner_dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/banner_dark.jpg -------------------------------------------------------------------------------- /assets/images/google_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/google_logo.png -------------------------------------------------------------------------------- /assets/images/banner_light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/banner_light.jpg -------------------------------------------------------------------------------- /assets/fonts/GoogleSansRegular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/fonts/GoogleSansRegular.ttf -------------------------------------------------------------------------------- /assets/images/doodles/Group 60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Group 60.png -------------------------------------------------------------------------------- /assets/images/doodles/Group 61.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Group 61.png -------------------------------------------------------------------------------- /assets/images/doodles/Path 112.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Path 112.png -------------------------------------------------------------------------------- /assets/images/doodles/Path 127.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Path 127.png -------------------------------------------------------------------------------- /assets/images/doodles/Path 133.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Path 133.png -------------------------------------------------------------------------------- /assets/images/doodles/Path 134.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Path 134.png -------------------------------------------------------------------------------- /assets/images/doodles/Path 135.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Path 135.png -------------------------------------------------------------------------------- /assets/images/doodles/Path 136.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Path 136.png -------------------------------------------------------------------------------- /assets/images/devfest_logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/devfest_logo_dark.png -------------------------------------------------------------------------------- /assets/images/devfest_logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/devfest_logo_light.png -------------------------------------------------------------------------------- /assets/images/doodles/Ellipse 101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Ellipse 101.png -------------------------------------------------------------------------------- /assets/images/doodles/Ellipse 107.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/doodles/Ellipse 107.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 10@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 10@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 11@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 11@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 13@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 13@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 14@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 14@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 15@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 15@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 1@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 1@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 3@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 3@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 4@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 4@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 5@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 5@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 6@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 6@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 7@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 7@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 8@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 8@4x.png -------------------------------------------------------------------------------- /assets/images/id_card/Asset 9@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/assets/images/id_card/Asset 9@4x.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/config/index.dart: -------------------------------------------------------------------------------- 1 | export 'config_bloc.dart'; 2 | export 'config_event.dart'; 3 | export 'config_page.dart'; 4 | export 'config_state.dart'; 5 | -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_gdg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/drawable-hdpi/ic_gdg.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_gdg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/drawable-mdpi/ic_gdg.png -------------------------------------------------------------------------------- /lib/home/index.dart: -------------------------------------------------------------------------------- 1 | export 'home_bloc.dart'; 2 | export 'home_event.dart'; 3 | export 'home_page.dart'; 4 | export 'home_screen.dart'; 5 | export 'home_state.dart'; 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_gdg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/drawable-xhdpi/ic_gdg.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_gdg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/drawable-xxhdpi/ic_gdg.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_gdg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/drawable-xxxhdpi/ic_gdg.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon.png -------------------------------------------------------------------------------- /android/app/bin/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/bin/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/bin/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/bin/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/bin/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/bin/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-77.png -------------------------------------------------------------------------------- /android/app/bin/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/bin/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/bin/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/bin/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76@2x-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /lib/network/index.dart: -------------------------------------------------------------------------------- 1 | export 'firebase_client.dart'; 2 | export 'mock_client.dart'; 3 | export 'rest_client.dart'; 4 | export 'i_client.dart'; 5 | export 'network_service_response.dart'; 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-41.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Icon-Small@3x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/Icon-Small@3x-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/Icon-Small@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Notification-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Notification-1.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GDG-GANDHINAGAR/devfest-19-mobile/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 3 | org.eclipse.jdt.core.compiler.compliance=11 4 | org.eclipse.jdt.core.compiler.source=11 5 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/utils/tools.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Tools { 4 | static Color hexToColor(String code) { 5 | return Color(int.parse(code.substring(1, 7), radix: 16) + 0xFF000000); 6 | } 7 | 8 | static List multiColors = [ 9 | Colors.red, 10 | Colors.amber, 11 | Colors.green, 12 | Colors.blue, 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/network/i_client.dart: -------------------------------------------------------------------------------- 1 | // * Inteface for different Clients 2 | import 'index.dart'; 3 | 4 | abstract class IClient { 5 | Future> getAsync(String resourcePath, 6 | {bool customHeaders}); 7 | Future> postAsync( 8 | String resourcePath, dynamic data, 9 | {bool customHeaders = false}); 10 | } 11 | -------------------------------------------------------------------------------- /android/app/bin/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/bin/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/bin/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /lib/network/network_service_response.dart: -------------------------------------------------------------------------------- 1 | class NetworkServiceResponse { 2 | T content; 3 | bool success; 4 | String message; 5 | 6 | NetworkServiceResponse({this.content, this.success, this.message}); 7 | } 8 | 9 | class MappedNetworkServiceResponse { 10 | dynamic mappedResult; 11 | NetworkServiceResponse networkServiceResponse; 12 | MappedNetworkServiceResponse( 13 | {this.mappedResult, this.networkServiceResponse}); 14 | } 15 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/flutter_devfest/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutter_devfest; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/network/firebase_client.dart: -------------------------------------------------------------------------------- 1 | // * Not needed as of now 2 | import 'index.dart'; 3 | 4 | class FirebaseClient implements IClient { 5 | @override 6 | Future> getAsync(String resourcePath, 7 | {bool customHeaders}) { 8 | return null; 9 | } 10 | 11 | @override 12 | Future> postAsync( 13 | String resourcePath, data, 14 | {bool customHeaders = false}) { 15 | return null; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/app/bin/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/faq/faq_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 3 | 4 | class FaqPage extends StatelessWidget { 5 | static const String routeName = "/faq"; 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | // var _homeBloc = HomeBloc(); 10 | return DevScaffold( 11 | body: Container( 12 | child: Center( 13 | child: Text("Coming Soon"), 14 | ), 15 | ), 16 | title: "FAQ", 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon-Small@2x.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon-Small@3x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon-Small@3x-1.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /test/api_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/home/home_provider.dart'; 2 | import 'package:devfest_gandhinagar/network/index.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group(("Api tests"), () {}); 7 | test( 8 | "Fetch Speakers List", 9 | () async { 10 | IClient _client = RestClient(); 11 | final res = await _client.getAsync(HomeProvider.kConstGetSpeakersUrl); 12 | print(res.mappedResult); 13 | expect(res.networkServiceResponse.success, true); 14 | }, 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /lib/find_devfest/find_devfest_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 3 | 4 | class FindDevFestPage extends StatelessWidget { 5 | static const String routeName = "/find"; 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | // var _homeBloc = HomeBloc(); 10 | return DevScaffold( 11 | body: Container( 12 | child: Center( 13 | child: Text("Coming Soon"), 14 | ), 15 | ), 16 | title: "Find A DevFest", 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/utils/simple_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | 3 | class SimpleBlocDelegate extends BlocDelegate { 4 | @override 5 | void onEvent(Bloc bloc, Object event) { 6 | super.onEvent(bloc, event); 7 | print(event); 8 | } 9 | 10 | @override 11 | void onTransition(Bloc bloc, Transition transition) { 12 | super.onTransition(bloc, transition); 13 | print(transition); 14 | } 15 | 16 | @override 17 | void onError(Bloc bloc, Object error, StackTrace stacktrace) { 18 | super.onError(bloc, error, stacktrace); 19 | print('$error, $stacktrace'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | #import "GoogleMaps/GoogleMaps.h" 4 | 5 | @implementation AppDelegate 6 | 7 | - (BOOL)application:(UIApplication *)application 8 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 9 | [GMSServices provideAPIKey:@"AIzaSyBbVhNgB0A4LxV1dFZHiUjSo43swxyGYRY"]; 10 | [GeneratedPluginRegistrant registerWithRegistry:self]; 11 | // Override point for customization after application launch. 12 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | classpath 'com.google.gms:google-services:4.2.0' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | jcenter() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | task clean(type: Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /lib/agenda/ml_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/home/speaker.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:devfest_gandhinagar/agenda/session_list.dart'; 4 | import 'package:devfest_gandhinagar/home/index.dart'; 5 | 6 | class MLScreen extends StatelessWidget { 7 | final HomeBloc homeBloc; 8 | final List sessions; 9 | 10 | const MLScreen({Key key, this.homeBloc, @required this.sessions}) 11 | : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | var mlSessions = sessions.where((s) => s.track == "ml").toList(); 15 | return SessionList( 16 | allSessions: mlSessions, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/agenda/web_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/home/speaker.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:devfest_gandhinagar/agenda/session_list.dart'; 4 | import 'package:devfest_gandhinagar/home/index.dart'; 5 | 6 | class WebScreen extends StatelessWidget { 7 | final HomeBloc homeBloc; 8 | final List sessions; 9 | 10 | const WebScreen({Key key, this.homeBloc, @required this.sessions}) 11 | : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | var webSessions = sessions.where((s) => s.track == "web").toList(); 15 | return SessionList( 16 | allSessions: webSessions, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/agenda/cloud_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/home/speaker.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:devfest_gandhinagar/agenda/session_list.dart'; 4 | import 'package:devfest_gandhinagar/home/index.dart'; 5 | 6 | class MLScreen extends StatelessWidget { 7 | final HomeBloc homeBloc; 8 | final List sessions; 9 | 10 | const MLScreen({Key key, this.homeBloc, @required this.sessions}) 11 | : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | var mlSessions = 15 | sessions.where((s) => s.track == "cloud" || s.track == "misc").toList(); 16 | return SessionList( 17 | allSessions: mlSessions, 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/home/sponsor.dart: -------------------------------------------------------------------------------- 1 | class Sponsor { 2 | String name; 3 | String image; 4 | String desc; 5 | String url; 6 | String logo; 7 | 8 | Sponsor({this.name, this.desc, this.url, this.logo}); 9 | 10 | Sponsor.fromJson(Map json) { 11 | name = json['name']; 12 | image = json['image']; 13 | desc = json['desc']; 14 | url = json['url']; 15 | // logo = json['logo']; 16 | } 17 | 18 | Map toJson() { 19 | final Map data = new Map(); 20 | data['name'] = this.name; 21 | data['image'] = this.image; 22 | data['desc'] = this.desc; 23 | data['url'] = this.url; 24 | // data['logo'] = this.logo; 25 | return data; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/agenda/mobile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/home/speaker.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:devfest_gandhinagar/agenda/session_list.dart'; 4 | import 'package:devfest_gandhinagar/home/index.dart'; 5 | 6 | class MobileScreen extends StatelessWidget { 7 | final HomeBloc homeBloc; 8 | final List sessions; 9 | 10 | const MobileScreen({Key key, this.homeBloc, @required this.sessions}) 11 | : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | var mobileSessions = 15 | sessions.where((s) => s.track == "mobile" || s.track == "ml").toList(); 16 | return SessionList( 17 | allSessions: mobileSessions, 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/utils/dependency_injection.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/network/index.dart'; 2 | 3 | enum Flavor { MOCK, REST, FIREBASE } 4 | 5 | //DI 6 | class Injector { 7 | static final Injector _singleton = new Injector._internal(); 8 | static Flavor _flavor; 9 | 10 | static void configure(Flavor flavor) { 11 | _flavor = flavor; 12 | } 13 | 14 | factory Injector() { 15 | return _singleton; 16 | } 17 | 18 | Injector._internal(); 19 | 20 | IClient get currentClient { 21 | switch (_flavor) { 22 | case Flavor.MOCK: 23 | return MockClient(); 24 | case Flavor.FIREBASE: 25 | //* Yet to add 26 | return FirebaseClient(); 27 | default: 28 | return RestClient(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/home/home_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:bloc/bloc.dart'; 3 | import 'package:devfest_gandhinagar/home/index.dart'; 4 | 5 | class HomeBloc extends Bloc { 6 | static final HomeBloc _homeBlocSingleton = HomeBloc._internal(); 7 | factory HomeBloc() { 8 | return _homeBlocSingleton; 9 | } 10 | HomeBloc._internal(); 11 | 12 | HomeState get initialState => UnHomeState(); 13 | 14 | @override 15 | Stream mapEventToState( 16 | HomeEvent event, 17 | ) async* { 18 | yield UnHomeState(); 19 | try { 20 | yield await event.applyAsync(currentState: currentState, bloc: this); 21 | } catch (_, stackTrace) { 22 | print('$_ $stackTrace'); 23 | yield currentState; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/dialogs/dialog_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DialogCard extends StatelessWidget { 4 | final Widget child; 5 | final Color color; 6 | 7 | DialogCard({Key key, @required this.child, this.color = Colors.white}) 8 | : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Center( 13 | child: Padding( 14 | padding: const EdgeInsets.all(18.0), 15 | child: Card( 16 | color: color, 17 | shape: RoundedRectangleBorder( 18 | borderRadius: BorderRadius.circular(10), 19 | ), 20 | child: Padding( 21 | padding: const EdgeInsets.all(20.0), 22 | child: child, 23 | ), 24 | ), 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/config/config_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:bloc/bloc.dart'; 3 | import 'package:devfest_gandhinagar/config/index.dart'; 4 | 5 | class ConfigBloc extends Bloc { 6 | static final ConfigBloc _configBlocSingleton = ConfigBloc._internal(); 7 | factory ConfigBloc() { 8 | return _configBlocSingleton; 9 | } 10 | ConfigBloc._internal(); 11 | 12 | bool darkModeOn = false; 13 | 14 | ConfigState get initialState => new UnConfigState(); 15 | 16 | @override 17 | Stream mapEventToState( 18 | ConfigEvent event, 19 | ) async* { 20 | try { 21 | yield UnConfigState(); 22 | yield await event.applyAsync(currentState: currentState, bloc: this); 23 | } catch (_, stackTrace) { 24 | print('$_ $stackTrace'); 25 | yield currentState; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/home/home_event.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:devfest_gandhinagar/home/home_provider.dart'; 3 | import 'package:devfest_gandhinagar/home/index.dart'; 4 | import 'package:meta/meta.dart'; 5 | 6 | @immutable 7 | abstract class HomeEvent { 8 | Future applyAsync({HomeState currentState, HomeBloc bloc}); 9 | } 10 | 11 | class LoadHomeEvent extends HomeEvent { 12 | final IHomeProvider _homeProvider = HomeProvider(); 13 | @override 14 | String toString() => 'LoadHomeEvent'; 15 | 16 | @override 17 | Future applyAsync({HomeState currentState, HomeBloc bloc}) async { 18 | try { 19 | var res = await _homeProvider.getSpeakers(); 20 | return InHomeState(speakersData: res); 21 | } catch (_, stackTrace) { 22 | print('$_ $stackTrace'); 23 | return ErrorHomeState(_?.toString()); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/universal/image_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/config/index.dart'; 3 | import 'package:devfest_gandhinagar/utils/tools.dart'; 4 | 5 | class ImageCard extends StatelessWidget { 6 | final String img; 7 | 8 | const ImageCard({Key key, this.img}) : super(key: key); 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | padding: const EdgeInsets.all(20.0), 13 | height: MediaQuery.of(context).size.height * 0.3, 14 | width: MediaQuery.of(context).size.width, 15 | child: Image.asset( 16 | img, 17 | fit: BoxFit.cover, 18 | filterQuality: FilterQuality.high, 19 | ), 20 | decoration: BoxDecoration( 21 | color: ConfigBloc().darkModeOn 22 | ? Tools.hexToColor("#1f2124") 23 | : Colors.white, 24 | borderRadius: BorderRadius.circular( 25 | 10.0, 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/home/home_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/home/speaker.dart'; 2 | import 'package:devfest_gandhinagar/network/i_client.dart'; 3 | import 'package:devfest_gandhinagar/utils/dependency_injection.dart'; 4 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 5 | 6 | abstract class IHomeProvider { 7 | Future getSpeakers(); 8 | } 9 | 10 | class HomeProvider implements IHomeProvider { 11 | IClient _client; 12 | 13 | static final String kConstGetSpeakersUrl = 14 | "${Devfest.baseUrl}/speaker-kol.json"; 15 | 16 | HomeProvider() { 17 | _client = Injector().currentClient; 18 | } 19 | 20 | @override 21 | Future getSpeakers() async { 22 | var result = await _client.getAsync(kConstGetSpeakersUrl); 23 | if (result.networkServiceResponse.success) { 24 | SpeakersData res = SpeakersData.fromJson(result.mappedResult); 25 | return res; 26 | } 27 | 28 | throw Exception(result.networkServiceResponse.message); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/dialogs/loading_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 3 | 4 | class LoadingDialog extends StatelessWidget { 5 | final Widget child; 6 | 7 | LoadingDialog({Key key, this.child}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Center( 12 | child: Card( 13 | shape: RoundedRectangleBorder( 14 | borderRadius: BorderRadius.circular(10), 15 | ), 16 | child: Padding( 17 | padding: const EdgeInsets.all(20.0), 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 20 | mainAxisSize: MainAxisSize.min, 21 | children: [ 22 | CircularProgressIndicator(), 23 | SizedBox( 24 | height: 10, 25 | ), 26 | Text(Devfest.loading_text), 27 | ], 28 | ), 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/config/config_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:meta/meta.dart'; 3 | 4 | @immutable 5 | abstract class ConfigState extends Equatable { 6 | ConfigState([Iterable props]) : super(props); 7 | 8 | /// Copy object for use in action 9 | ConfigState getStateCopy(); 10 | } 11 | 12 | /// UnInitialized 13 | class UnConfigState extends ConfigState { 14 | @override 15 | String toString() => 'UnConfigState'; 16 | 17 | @override 18 | ConfigState getStateCopy() { 19 | return UnConfigState(); 20 | } 21 | } 22 | 23 | /// Initialized 24 | class InConfigState extends ConfigState { 25 | @override 26 | String toString() => 'InConfigState'; 27 | 28 | @override 29 | ConfigState getStateCopy() { 30 | return InConfigState(); 31 | } 32 | } 33 | 34 | class ErrorConfigState extends ConfigState { 35 | final String errorMessage; 36 | 37 | ErrorConfigState(this.errorMessage); 38 | 39 | @override 40 | String toString() => 'ErrorConfigState'; 41 | 42 | @override 43 | ConfigState getStateCopy() { 44 | return ErrorConfigState(this.errorMessage); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # License 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2019 GDG Gandhinagar 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /lib/dialogs/dialog_title_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'dialog_card.dart'; 4 | 5 | class TitleMessageDialog extends StatelessWidget { 6 | final String title; 7 | final String message; 8 | 9 | const TitleMessageDialog({Key key, this.title = "", @required this.message}) 10 | : super(key: key); 11 | @override 12 | Widget build(BuildContext context) { 13 | return DialogCard( 14 | child: Column( 15 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 16 | mainAxisSize: MainAxisSize.min, 17 | children: [ 18 | Text( 19 | title, 20 | textAlign: TextAlign.center, 21 | softWrap: true, 22 | textScaleFactor: 1.5, 23 | style: TextStyle( 24 | fontWeight: FontWeight.bold, 25 | color: Colors.black, 26 | ), 27 | ), 28 | Text( 29 | message, 30 | softWrap: true, 31 | textAlign: TextAlign.center, 32 | style: TextStyle( 33 | color: Colors.black, 34 | ), 35 | ), 36 | ], 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/network/mock_client.dart: -------------------------------------------------------------------------------- 1 | // * Not needed as of now 2 | import 'dart:convert'; 3 | 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:devfest_gandhinagar/home/home_provider.dart'; 6 | import 'package:devfest_gandhinagar/home/speaker.dart'; 7 | 8 | import 'index.dart'; 9 | 10 | class MockClient implements IClient { 11 | @override 12 | Future> getAsync(String resourcePath, 13 | {bool customHeaders}) async { 14 | var resultClass; 15 | if (resourcePath == HomeProvider.kConstGetSpeakersUrl) { 16 | var speakersRawString = jsonEncode(SpeakersData(speakers: speakers)); 17 | resultClass = await compute(jsonParserIsolate, speakersRawString); 18 | } 19 | 20 | return MappedNetworkServiceResponse( 21 | mappedResult: resultClass, 22 | networkServiceResponse: NetworkServiceResponse(success: true)); 23 | } 24 | 25 | @override 26 | Future> postAsync( 27 | String resourcePath, data, 28 | {bool customHeaders = false}) { 29 | return null; 30 | } 31 | 32 | // * JSON Decoding using Isolates 33 | static Map jsonParserIsolate(String res) { 34 | return jsonDecode(res); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/home/home_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:devfest_gandhinagar/home/speaker.dart'; 3 | import 'package:meta/meta.dart'; 4 | 5 | @immutable 6 | abstract class HomeState extends Equatable { 7 | HomeState([Iterable props]) : super(props); 8 | 9 | /// Copy object for use in action 10 | HomeState getStateCopy(); 11 | } 12 | 13 | /// UnInitialized 14 | class UnHomeState extends HomeState { 15 | @override 16 | String toString() => 'UnHomeState'; 17 | 18 | @override 19 | HomeState getStateCopy() { 20 | return UnHomeState(); 21 | } 22 | } 23 | 24 | /// Initialized 25 | class InHomeState extends HomeState { 26 | final SpeakersData speakersData; 27 | 28 | InHomeState({@required this.speakersData}) : super([speakersData]); 29 | @override 30 | String toString() => 'InHomeState'; 31 | 32 | @override 33 | HomeState getStateCopy() { 34 | return InHomeState(speakersData: this.speakersData); 35 | } 36 | } 37 | 38 | class ErrorHomeState extends HomeState { 39 | final String errorMessage; 40 | 41 | ErrorHomeState(this.errorMessage); 42 | 43 | @override 44 | String toString() => 'ErrorHomeState'; 45 | 46 | @override 47 | HomeState getStateCopy() { 48 | return ErrorHomeState(this.errorMessage); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | ## Flutter wrapper 2 | -keep class io.flutter.app.** { *; } 3 | -keep class io.flutter.plugin.** { *; } 4 | -keep class io.flutter.util.** { *; } 5 | -keep class io.flutter.view.** { *; } 6 | -keep class io.flutter.** { *; } 7 | -keep class io.flutter.plugins.** { *; } 8 | 9 | # http://proguard.sourceforge.net/manual/examples.html#androidapplication 10 | -optimizations !code/simplification/variable 11 | -keep public class * extends android.app.Activity 12 | -keep public class * extends android.app.Fragment 13 | -keep public class * extends android.support.v4.app.Fragment 14 | # The Maps Android API uses custom parcelables. 15 | # Use this rule (which is slightly broader than the standard recommended one) 16 | # to avoid obfuscating them. 17 | -keepclassmembers class * implements android.os.Parcelable { 18 | static *** CREATOR; 19 | } 20 | # The Maps Android API uses serialization. 21 | -keepclassmembers class * implements java.io.Serializable { 22 | static final long serialVersionUID; 23 | static final java.io.ObjectStreamField[] serialPersistentFields; 24 | private void writeObject(java.io.ObjectOutputStream); 25 | private void readObject(java.io.ObjectInputStream); 26 | java.lang.Object writeReplace(); 27 | java.lang.Object readResolve(); 28 | } 29 | -ignorewarnings 30 | -keep class * { 31 | public private *; 32 | } 33 | -------------------------------------------------------------------------------- /lib/config/config_event.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:devfest_gandhinagar/config/index.dart'; 3 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 4 | import 'package:meta/meta.dart'; 5 | 6 | @immutable 7 | abstract class ConfigEvent { 8 | Future applyAsync({ConfigState currentState, ConfigBloc bloc}); 9 | } 10 | 11 | class DarkModeEvent extends ConfigEvent { 12 | final bool darkOn; 13 | DarkModeEvent(this.darkOn); 14 | @override 15 | String toString() => 'DarkModeEvent'; 16 | 17 | @override 18 | Future applyAsync( 19 | {ConfigState currentState, ConfigBloc bloc}) async { 20 | try { 21 | bloc.darkModeOn = darkOn; 22 | Devfest.prefs.setBool(Devfest.darkModePref, darkOn); 23 | return InConfigState(); 24 | } catch (_, stackTrace) { 25 | print('$_ $stackTrace'); 26 | return new ErrorConfigState(_?.toString()); 27 | } 28 | } 29 | } 30 | 31 | class LoadConfigEvent extends ConfigEvent { 32 | @override 33 | String toString() => 'LoadConfigEvent'; 34 | 35 | @override 36 | Future applyAsync( 37 | {ConfigState currentState, ConfigBloc bloc}) async { 38 | try { 39 | await Future.delayed(new Duration(seconds: 2)); 40 | 41 | return new InConfigState(); 42 | } catch (_, stackTrace) { 43 | print('$_ $stackTrace'); 44 | return new ErrorConfigState(_?.toString()); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/dialogs/error_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 3 | 4 | class ErrorDialog extends StatelessWidget { 5 | final Widget child; 6 | final error; 7 | final Function onTap; 8 | 9 | ErrorDialog( 10 | {Key key, this.child, this.error = Devfest.some_error_text, this.onTap}) 11 | : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Center( 16 | child: Padding( 17 | padding: const EdgeInsets.all(18.0), 18 | child: Card( 19 | shape: RoundedRectangleBorder( 20 | borderRadius: BorderRadius.circular(10), 21 | ), 22 | child: Padding( 23 | padding: const EdgeInsets.all(20.0), 24 | child: Column( 25 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 26 | mainAxisSize: MainAxisSize.min, 27 | children: [ 28 | Text(error), 29 | SizedBox( 30 | height: 10, 31 | ), 32 | FlatButton( 33 | colorBrightness: Brightness.dark, 34 | child: Text(Devfest.try_again_text), 35 | color: Colors.red, 36 | onPressed: () { 37 | Navigator.pop(context); 38 | if (onTap != null) { 39 | onTap(); 40 | } 41 | }, 42 | ) 43 | ], 44 | ), 45 | ), 46 | ), 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | google-services.json 13 | gifs/ 14 | 15 | # IntelliJ related 16 | *.iml 17 | *.ipr 18 | *.iws 19 | .idea/ 20 | 21 | # Visual Studio Code related 22 | .vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | .dart_tool/ 27 | .flutter-plugins 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Generated.xcconfig 62 | **/ios/Flutter/app.flx 63 | **/ios/Flutter/app.zip 64 | **/ios/Flutter/flutter_assets/ 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | -------------------------------------------------------------------------------- /lib/home/team.dart: -------------------------------------------------------------------------------- 1 | class Team { 2 | String name; 3 | String desc; 4 | String job; 5 | String image; 6 | String speciality; 7 | String fbUrl; 8 | String twitterUrl; 9 | String linkedinUrl; 10 | String githubUrl; 11 | String team; 12 | bool isCore; 13 | double index; 14 | 15 | Team({ 16 | this.name, 17 | this.desc, 18 | this.job, 19 | this.image, 20 | this.speciality, 21 | this.fbUrl, 22 | this.twitterUrl, 23 | this.linkedinUrl, 24 | this.githubUrl, 25 | this.team, 26 | this.isCore, 27 | double index, 28 | }); 29 | 30 | Team.fromJson(Map json) { 31 | name = json['name']; 32 | desc = json['desc']; 33 | job = json['job']; 34 | image = json['image']; 35 | speciality = json['speciality']; 36 | fbUrl = json['fb_url']; 37 | twitterUrl = json['twitter_url']; 38 | linkedinUrl = json['linkedin_url']; 39 | githubUrl = json['github_url']; 40 | team = json['team']; 41 | isCore = json["core"]; 42 | index = double.parse(json["index"].toString()); 43 | } 44 | 45 | Map toJson() { 46 | final Map data = new Map(); 47 | data['name'] = this.name; 48 | data['desc'] = this.desc; 49 | data['job'] = this.job; 50 | data['image'] = this.image; 51 | data['speciality'] = this.speciality; 52 | data['fb_url'] = this.fbUrl; 53 | data['twitter_url'] = this.twitterUrl; 54 | data['linkedin_url'] = this.linkedinUrl; 55 | data['github_url'] = this.githubUrl; 56 | data['team'] = this.team; 57 | data['isCore'] = this.isCore; 58 | data['index'] = this.index; 59 | return data; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | DevFest App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_devfest 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | io.flutter.embedded_views_preview 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /android/app/bin/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DevFest 2019 App 2 |

3 | 4 |

5 | 6 |

7 |

:rocket: Get Started

8 | 9 | ## 📸 ScreenShots 10 | 11 | | Light Theme | Dark Theme | 12 | | :----------------------------------: | :----------------------------------: | 13 | | ![](https://i.imgur.com/ipUdGyk.png) | ![](https://i.imgur.com/u1rCsZ8.png) | 14 | | ![](https://i.imgur.com/rujH2xz.png) | ![](https://i.imgur.com/gOx5T8H.png) | 15 | | ![](https://i.imgur.com/RubqN3Z.png) | ![](https://i.imgur.com/D2Ucb2t.png) | 16 | 17 | ### Show some :heart: and star the repo to support the project 18 | 19 | ## Overview 20 | 21 | DevFest Mobile application is for all the GDG Devfests around the world. You can see the agenda in the app as well as the speakers and other updates regarding the devfest. 22 | 23 | ## Technology Stack 24 | 25 | - Flutter 26 | - Flutter Bloc 27 | - Firebase (Upcoming) 28 | 29 | ### Using GitHub Issues 30 | 31 | - Feel free to use GitHub issues for questions, bug reports, and feature requests 32 | - Use the search feature to check for an existing issue 33 | - Include as much information as possible and provide any relevant resources (Eg. screenshots) 34 | - For bug reports ensure you have a reproducible test case 35 | - A pull request with a breaking test would be super preferable here but isn't required 36 | 37 | ### Submitting a Pull Request 38 | 39 | - Squash commits 40 | - Lint your code with eslint (config provided) 41 | - Include relevant test updates/additions 42 | 43 | ## License 44 | 45 | Project is published under the [MIT license](/LICENSE.md). 46 | Feel free to clone and modify repo as you want, but don't forget to add reference to authors :) 47 | 48 | _GDG DevFest App is not endorsed and/or supported by Google, the corporation._ 49 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 15 | 22 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lib/universal/dev_scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/config/config_bloc.dart'; 3 | import 'package:devfest_gandhinagar/config/config_event.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | import 'package:share/share.dart'; 6 | 7 | class DevScaffold extends StatelessWidget { 8 | final String title; 9 | final Widget body; 10 | final Widget tabBar; 11 | 12 | const DevScaffold( 13 | {Key key, @required this.body, @required this.title, this.tabBar}) 14 | : super(key: key); 15 | @override 16 | Widget build(BuildContext context) { 17 | return AnimatedContainer( 18 | duration: Duration(milliseconds: 500), 19 | color: ConfigBloc().darkModeOn ? Colors.grey[800] : Colors.white, 20 | child: SafeArea( 21 | top: false, 22 | bottom: false, 23 | child: Scaffold( 24 | appBar: AppBar( 25 | title: Text(title), 26 | centerTitle: true, 27 | bottom: tabBar != null ? tabBar : null, 28 | actions: [ 29 | IconButton( 30 | icon: Icon( 31 | ConfigBloc().darkModeOn 32 | ? FontAwesomeIcons.lightbulb 33 | : FontAwesomeIcons.solidLightbulb, 34 | size: 18, 35 | ), 36 | onPressed: () { 37 | ConfigBloc() 38 | .dispatch(DarkModeEvent(!ConfigBloc().darkModeOn)); 39 | }, 40 | ), 41 | IconButton( 42 | onPressed: () => Share.share( 43 | "Download the new GDG Gandhinagar DevFest App and share with your tech friends.\nWebsite - https://devfest.gdggandhinagar.org/"), 44 | icon: Icon( 45 | Icons.share, 46 | size: 20, 47 | ), 48 | ), 49 | ], 50 | ), 51 | body: body, 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /android/app/bin/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.flutter_devfest" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:cloud_firestore/cloud_firestore.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | import 'package:devfest_gandhinagar/utils/dependency_injection.dart'; 6 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 7 | import 'package:devfest_gandhinagar/utils/simple_bloc.dart'; 8 | import 'package:shared_preferences/shared_preferences.dart'; 9 | 10 | import 'config/config_page.dart'; 11 | 12 | Future main() async { 13 | SystemChrome.setSystemUIOverlayStyle( 14 | SystemUiOverlayStyle( 15 | statusBarColor: Colors.transparent, 16 | ), 17 | ); 18 | 19 | //* Forcing only portrait orientation 20 | SystemChrome.setPreferredOrientations( 21 | [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); 22 | 23 | // * Get Shared Preference Instance for whole app 24 | Devfest.prefs = await SharedPreferences.getInstance(); 25 | 26 | //* To check the app is running in debug and set some variables for that 27 | Devfest.checkDebug(); 28 | 29 | //* Time travel debugging to check app states 30 | BlocSupervisor.delegate = SimpleBlocDelegate(); 31 | 32 | // * Set flavor for your app. For eg - MOCK for offline, REST for some random server calls to your backend, FIREBASE for firebase calls 33 | Injector.configure(Flavor.MOCK); 34 | 35 | //* To check if the app is running on latest version 36 | DocumentSnapshot snapshot = 37 | await Firestore.instance.collection("homepage").document("data").get(); 38 | 39 | // Setting the default value of isUpdated to true 40 | // in case the app is offline and firestore fetch query fails 41 | if (snapshot.data["meta"]["app_version_code"] <= Devfest.app_version_code ?? 42 | true) { 43 | Devfest.prefs.setBool(Devfest.isUpdatedPref, true); 44 | Devfest.prefs.setString(Devfest.recommendedVersionPref, 45 | snapshot.data["meta"]["app_version_name"] ?? "1.0.0"); 46 | // print("Set isupdated bool to true"); 47 | } else { 48 | Devfest.prefs.setBool(Devfest.isUpdatedPref, false); 49 | Devfest.prefs.setString(Devfest.recommendedVersionPref, 50 | snapshot.data["meta"]["app_version_name"] ?? "1.0.0"); 51 | // print("Set isupdated bool to false"); 52 | } 53 | 54 | runApp(ConfigPage()); 55 | } 56 | -------------------------------------------------------------------------------- /lib/universal/profileAvatar.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ProfileAvatar extends CustomPainter { 5 | double xCircle, yCircle, xSquare, ySquare; 6 | static double randomValue; 7 | static bool isRootNegative; 8 | Random random; 9 | 10 | ProfileAvatar() { 11 | random = new Random(); 12 | isRootNegative = isRootNegative ?? random.nextBool(); 13 | randomValue = randomValue ?? random.nextDouble(); 14 | } 15 | 16 | double getXaxisCircle(double width) { 17 | double value = width * randomValue; 18 | return value; 19 | } 20 | 21 | double getYaxisCircle(double xC, Size size) { 22 | final double r = (size.width / 2); 23 | final double g = (size.width / 2); 24 | final double h = (size.height / 2); 25 | double value = isRootNegative 26 | ? h + sqrt((pow(r, 2) - pow((xC - g), 2))) 27 | : h - sqrt((pow(r, 2) - pow((xC - g), 2))); 28 | return value; 29 | } 30 | 31 | double getXaxisSquare(double xC, double width) { 32 | final double minDiffX = (120 / 180) * width; 33 | double value = xC + minDiffX; 34 | return value % width; 35 | } 36 | 37 | double getYaxisSquare(double xS, Size size) { 38 | final double r = (size.width / 2); 39 | final double g = (size.width / 2); 40 | final double h = (size.height / 2); 41 | double value = isRootNegative 42 | ? h + sqrt((pow(r, 2) - pow((xS - g), 2))) 43 | : h - sqrt((pow(r, 2) - pow((xS - g), 2))); 44 | return value; 45 | } 46 | 47 | @override 48 | void paint(Canvas canvas, Size size) { 49 | Paint paint = new Paint(); 50 | paint.color = Colors.blue; 51 | paint.style = PaintingStyle.stroke; 52 | paint.strokeWidth = 3; 53 | 54 | xCircle = getXaxisCircle(size.width); 55 | yCircle = getYaxisCircle(xCircle, size); 56 | 57 | canvas.drawCircle( 58 | Offset(xCircle, yCircle), 59 | 9, 60 | paint, 61 | ); 62 | 63 | xSquare = getXaxisSquare(xCircle, size.width); 64 | ySquare = getYaxisSquare(xSquare, size); 65 | 66 | paint.color = Colors.green; 67 | 68 | canvas.drawRect( 69 | Rect.fromCenter( 70 | center: Offset(xSquare, ySquare), 71 | height: 20, 72 | width: 20, 73 | ), 74 | paint, 75 | ); 76 | } 77 | 78 | @override 79 | bool shouldRepaint(CustomPainter oldDelegate) { 80 | return false; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 64 | install! 'cocoapods', :disable_input_output_paths => true 65 | 66 | post_install do |installer| 67 | installer.pods_project.targets.each do |target| 68 | target.build_configurations.each do |config| 69 | config.build_settings['ENABLE_BITCODE'] = 'NO' 70 | end 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /lib/home/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:devfest_gandhinagar/dialogs/error_dialog.dart'; 6 | import 'package:devfest_gandhinagar/home/home_widgets/home_front.dart'; 7 | import 'package:devfest_gandhinagar/home/index.dart'; 8 | import 'package:devfest_gandhinagar/utils/tools.dart'; 9 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 10 | 11 | class HomeScreen extends StatefulWidget { 12 | const HomeScreen({ 13 | Key key, 14 | @required HomeBloc homeBloc, 15 | }) : _homeBloc = homeBloc, 16 | super(key: key); 17 | 18 | final HomeBloc _homeBloc; 19 | 20 | @override 21 | HomeScreenState createState() { 22 | return HomeScreenState(_homeBloc); 23 | } 24 | } 25 | 26 | class HomeScreenState extends State { 27 | final HomeBloc _homeBloc; 28 | HomeScreenState(this._homeBloc); 29 | 30 | @override 31 | void initState() { 32 | super.initState(); 33 | this._homeBloc.dispatch(LoadHomeEvent()); 34 | } 35 | 36 | @override 37 | void dispose() { 38 | super.dispose(); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return BlocListener( 44 | bloc: widget._homeBloc, 45 | listener: (context, state) { 46 | if (state is ErrorHomeState) { 47 | showDialog( 48 | context: context, 49 | barrierDismissible: false, 50 | builder: (context) => ErrorDialog( 51 | error: state.errorMessage, 52 | onTap: () { 53 | _homeBloc.dispatch(LoadHomeEvent()); 54 | }, 55 | ), 56 | ); 57 | } 58 | }, 59 | child: BlocBuilder( 60 | bloc: widget._homeBloc, 61 | builder: ( 62 | BuildContext context, 63 | HomeState currentState, 64 | ) { 65 | if (currentState is UnHomeState) { 66 | return Container( 67 | color: Theme.of(context).scaffoldBackgroundColor, 68 | child: Center( 69 | child: SpinKitChasingDots( 70 | color: Tools.multiColors[Random().nextInt(3)], 71 | ), 72 | ), 73 | ); 74 | } 75 | if (currentState is ErrorHomeState) { 76 | return Container( 77 | padding: const EdgeInsets.all(16.0), 78 | child: Center( 79 | child: Text( 80 | currentState.errorMessage ?? 'Error', 81 | textAlign: TextAlign.center, 82 | ), 83 | )); 84 | } 85 | return HomeFront(); 86 | }), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '6' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.4.2' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | def keystoreProperties = new Properties() 28 | def keystorePropertiesFile = rootProject.file('key.properties') 29 | if (keystorePropertiesFile.exists()) { 30 | // keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 31 | } 32 | 33 | android { 34 | compileSdkVersion 28 35 | 36 | lintOptions { 37 | disable 'InvalidPackage' 38 | } 39 | 40 | defaultConfig { 41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 42 | applicationId "org.gdggandhinagar.devfest" 43 | minSdkVersion 16 44 | targetSdkVersion 28 45 | multiDexEnabled true 46 | versionCode flutterVersionCode.toInteger() 47 | versionName flutterVersionName 48 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 49 | } 50 | 51 | // signingConfigs { 52 | // release { 53 | // keyAlias keystoreProperties['keyAlias'] 54 | // keyPassword keystoreProperties['keyPassword'] 55 | // storeFile file(keystoreProperties['storeFile']) 56 | // storePassword keystoreProperties['storePassword'] 57 | // } 58 | // } 59 | buildTypes { 60 | release { 61 | signingConfig signingConfigs.debug 62 | 63 | minifyEnabled true 64 | useProguard true 65 | 66 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 67 | } 68 | } 69 | } 70 | 71 | flutter { 72 | source '../..' 73 | } 74 | 75 | dependencies { 76 | testImplementation 'junit:junit:4.12' 77 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 78 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 79 | implementation 'com.google.firebase:firebase-core:17.0.0' 80 | } 81 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Notification@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Notification@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-Small@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-Small@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-Small-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-Notification-1.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "20x20", 66 | "scale" : "2x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "29x29", 71 | "scale" : "1x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "29x29", 76 | "scale" : "2x" 77 | }, 78 | { 79 | "size" : "40x40", 80 | "idiom" : "ipad", 81 | "filename" : "Icon-Small-41.png", 82 | "scale" : "1x" 83 | }, 84 | { 85 | "idiom" : "ipad", 86 | "size" : "40x40", 87 | "scale" : "2x" 88 | }, 89 | { 90 | "size" : "76x76", 91 | "idiom" : "ipad", 92 | "filename" : "Icon-77.png", 93 | "scale" : "1x" 94 | }, 95 | { 96 | "size" : "76x76", 97 | "idiom" : "ipad", 98 | "filename" : "Icon-76@2x-1.png", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "size" : "83.5x83.5", 103 | "idiom" : "ipad", 104 | "filename" : "Icon-83.5@2x-1.png", 105 | "scale" : "2x" 106 | }, 107 | { 108 | "size" : "1024x1024", 109 | "idiom" : "ios-marketing", 110 | "filename" : "icon.png", 111 | "scale" : "1x" 112 | } 113 | ], 114 | "info" : { 115 | "version" : 1, 116 | "author" : "xcode" 117 | } 118 | } -------------------------------------------------------------------------------- /lib/network/rest_client.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'dart:io'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:http/http.dart' show Client, Response; 6 | 7 | import 'index.dart'; 8 | 9 | // * RestClient for HTTP Requests 10 | 11 | class RestClient implements IClient { 12 | Map authHeaders; 13 | Map headers = { 14 | HttpHeaders.contentTypeHeader: 'application/json', 15 | HttpHeaders.acceptHeader: 'application/json', 16 | }; 17 | 18 | Client _client; 19 | 20 | RestClient({Client client}) { 21 | if (client == null) { 22 | _client = Client(); 23 | } else { 24 | _client = client; 25 | } 26 | authHeaders = { 27 | HttpHeaders.contentTypeHeader: 'application/json', 28 | HttpHeaders.acceptHeader: 'application/json', 29 | }; 30 | } 31 | 32 | // * Method for HTTP GET REQUEST 33 | @override 34 | Future> getAsync(String resourcePath, 35 | {bool customHeaders}) async { 36 | var response = await _client.get( 37 | resourcePath, 38 | headers: customHeaders == true ? authHeaders : headers, 39 | ); 40 | return await processResponse(response); 41 | } 42 | 43 | // * Method for HTTP POST REQUEST 44 | @override 45 | Future> postAsync( 46 | String resourcePath, dynamic data, 47 | {bool customHeaders = false}) async { 48 | if (customHeaders) { 49 | authHeaders.putIfAbsent("Authorization", () => "Token (if any)"); 50 | } 51 | var content = json.encoder.convert(data); 52 | print(content); 53 | var response = await _client.post(resourcePath, 54 | body: content, headers: customHeaders == true ? authHeaders : headers); 55 | 56 | return await processResponse(response); 57 | } 58 | 59 | Future> processResponse( 60 | Response response) async { 61 | try { 62 | if (!((response.statusCode < HttpStatus.ok) || 63 | (response.statusCode >= HttpStatus.multipleChoices) || 64 | (response.body == null))) { 65 | var resultClass = await compute(jsonParserIsolate, response.body); 66 | 67 | return MappedNetworkServiceResponse( 68 | mappedResult: resultClass, 69 | networkServiceResponse: NetworkServiceResponse(success: true)); 70 | } else { 71 | var errorResponse = response.body; 72 | return MappedNetworkServiceResponse( 73 | networkServiceResponse: NetworkServiceResponse( 74 | success: false, 75 | message: 76 | "(${response.statusCode}) ${errorResponse.toString()}")); 77 | } 78 | } on SocketException catch (_) { 79 | return MappedNetworkServiceResponse( 80 | networkServiceResponse: NetworkServiceResponse( 81 | success: false, 82 | message: 83 | "(${response.statusCode}) Can't reach the servers, \n Please check your internet connection.")); 84 | } 85 | } 86 | 87 | // * JSON Decoding using Isolates 88 | static Map jsonParserIsolate(String res) { 89 | return jsonDecode(res); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/agenda/session_list.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:devfest_gandhinagar/home/speaker.dart'; 5 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:devfest_gandhinagar/agenda/session_detail.dart'; 8 | import 'package:devfest_gandhinagar/utils/tools.dart'; 9 | 10 | class SessionList extends StatelessWidget { 11 | final List allSessions; 12 | 13 | const SessionList({Key key, @required this.allSessions}) : super(key: key); 14 | @override 15 | Widget build(BuildContext context) { 16 | if (allSessions.length < 1) { 17 | return Center( 18 | child: Text(Devfest.comingSoonText), 19 | ); 20 | } 21 | return ListView.builder( 22 | shrinkWrap: false, 23 | itemCount: allSessions.length, 24 | itemBuilder: (c, i) { 25 | return Card( 26 | elevation: 0.0, 27 | child: ListTile( 28 | onTap: () { 29 | Navigator.push( 30 | context, 31 | MaterialPageRoute( 32 | builder: (context) => SessionDetail( 33 | session: allSessions[i], 34 | ), 35 | ), 36 | ); 37 | }, 38 | isThreeLine: true, 39 | trailing: RichText( 40 | textAlign: TextAlign.center, 41 | text: TextSpan( 42 | text: "${allSessions[i].totalTime}\n", 43 | style: Theme.of(context) 44 | .textTheme 45 | .title 46 | .copyWith(fontSize: 14, fontWeight: FontWeight.bold), 47 | children: [ 48 | TextSpan( 49 | text: allSessions[i].startTime, 50 | style: Theme.of(context).textTheme.subtitle.copyWith( 51 | fontSize: 12, 52 | ), 53 | ), 54 | ], 55 | ), 56 | ), 57 | leading: Hero( 58 | tag: allSessions[i].speakerImage, 59 | child: CircleAvatar( 60 | radius: 30, 61 | backgroundImage: 62 | CachedNetworkImageProvider(allSessions[i].speakerImage), 63 | ), 64 | ), 65 | title: RichText( 66 | text: TextSpan( 67 | text: "${allSessions[i].speakerSession}\n", 68 | style: Theme.of(context).textTheme.title.copyWith(fontSize: 16), 69 | children: [ 70 | TextSpan( 71 | text: allSessions[i].speakerName, 72 | style: Theme.of(context).textTheme.subtitle.copyWith( 73 | fontSize: 14, 74 | color: Tools.multiColors[Random().nextInt(4)], 75 | ), 76 | children: []), 77 | ], 78 | ), 79 | ), 80 | subtitle: Text( 81 | allSessions[i].speakerDesc, 82 | style: Theme.of(context).textTheme.caption.copyWith( 83 | fontSize: 10.0, 84 | ), 85 | ), 86 | ), 87 | ); 88 | }, 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/home/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:devfest_gandhinagar/home/index.dart'; 3 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 4 | 5 | class HomePage extends StatelessWidget { 6 | static const String routeName = "/home"; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | var _homeBloc = HomeBloc(); 11 | // BorderRadiusGeometry radius = BorderRadius.only( 12 | // topLeft: Radius.circular(24.0), 13 | // topRight: Radius.circular(24.0), 14 | // ); 15 | 16 | return DevScaffold( 17 | body: HomeScreen(homeBloc: _homeBloc), 18 | // body: SlidingUpPanel( 19 | // parallaxEnabled: true, 20 | // backdropEnabled: true, 21 | // backdropTapClosesPanel: true, 22 | // maxHeight: MediaQuery.of(context).size.height * 0.6, 23 | // color: Theme.of(context).primaryColor, 24 | // panel: HomeSlidingPanel(), 25 | // collapsed: AnimatedContainer( 26 | // duration: Duration(milliseconds: 500), 27 | // decoration: BoxDecoration( 28 | // color: Theme.of(context).primaryColor, 29 | // ), 30 | // child: Column( 31 | // crossAxisAlignment: CrossAxisAlignment.center, 32 | // mainAxisAlignment: MainAxisAlignment.spaceAround, 33 | // mainAxisSize: MainAxisSize.max, 34 | // children: [ 35 | // AnimatedContainer( 36 | // duration: Duration(milliseconds: 500), 37 | // height: 5.0, 38 | // width: MediaQuery.of(context).size.width * 0.08, 39 | // decoration: BoxDecoration( 40 | // color: 41 | // ConfigBloc().darkModeOn ? Colors.white : Colors.grey[300], 42 | // borderRadius: BorderRadius.circular(5.0), 43 | // ), 44 | // ), 45 | // Row( 46 | // mainAxisAlignment: MainAxisAlignment.spaceAround, 47 | // children: [ 48 | // CircleAvatar( 49 | // radius: 15, 50 | // backgroundImage: CachedNetworkImageProvider( 51 | // "https://pbs.twimg.com/media/D22N_huX4AEbb1y.jpg"), 52 | // ), 53 | // SizedBox( 54 | // width: 15, 55 | // ), 56 | // Text( 57 | // "Locate Us", 58 | // textAlign: TextAlign.center, 59 | // style: Theme.of(context).textTheme.title, 60 | // ), 61 | // SizedBox( 62 | // width: 0, 63 | // ), 64 | // IconButton( 65 | // onPressed: () => Share.share( 66 | // "Download the new DevFest App and share with your tech friends.\nPlayStore - http://bit.ly/2GDr18N"), 67 | // icon: Icon( 68 | // Icons.share, 69 | // size: 20, 70 | // ), 71 | // ), 72 | // ], 73 | // ), 74 | // Offstage() 75 | // ], 76 | // ), 77 | // ), 78 | // body: HomeScreen(homeBloc: _homeBloc), 79 | // ), 80 | title: "Home", 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: devfest_gandhinagar 2 | description: DevFest Gandhinagar 2019 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.4.2+6 15 | 16 | environment: 17 | sdk: ">=2.2.2 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | bloc: ^0.14.4 23 | flutter_bloc: ^0.20.0 24 | equatable: ^0.3.0 25 | share: ^0.6.2+1 26 | url_launcher: ^5.1.1 27 | font_awesome_flutter: ^8.5.0 28 | cached_network_image: ^1.1.1 29 | shared_preferences: ^0.5.3+4 30 | flutter_spinkit: "^3.1.0" 31 | sliding_up_panel: ^0.3.4 32 | google_maps_flutter: ^0.5.19+2 33 | http: ^0.12.0+2 34 | cloud_firestore: ^0.12.9 35 | firebase_auth: ^0.14.0+3 36 | google_sign_in: ^4.0.6 37 | qr_flutter: ^3.0.1 38 | 39 | # The following adds the Cupertino Icons font to your application. 40 | # Use with the CupertinoIcons class for iOS style icons. 41 | cupertino_icons: ^0.1.2 42 | 43 | dev_dependencies: 44 | flutter_test: 45 | sdk: flutter 46 | 47 | # For information on the generic Dart part of this file, see the 48 | # following page: https://dart.dev/tools/pub/pubspec 49 | 50 | # The following section is specific to Flutter. 51 | flutter: 52 | # The following line ensures that the Material Icons font is 53 | # included with your application, so that you can use the icons in 54 | # the material Icons class. 55 | uses-material-design: true 56 | # To add assets to your application, add an assets section, like this: 57 | assets: 58 | - assets/ 59 | - assets/images/ 60 | - assets/images/doodles/ 61 | - assets/images/id_card/ 62 | # assets: 63 | # - images/a_dot_burr.jpeg 64 | # - images/a_dot_ham.jpeg 65 | # An image asset can refer to one or more resolution-specific "variants", see 66 | # https://flutter.dev/assets-and-images/#resolution-aware. 67 | # For details regarding adding assets from package dependencies, see 68 | # https://flutter.dev/assets-and-images/#from-packages 69 | # To add custom fonts to your application, add a fonts section here, 70 | # in this "flutter" section. Each entry in this list should have a 71 | # "family" key with the font family name, and a "fonts" key with a 72 | # list giving the asset and other descriptors for the font. For 73 | # example: 74 | fonts: 75 | - family: GoogleSans 76 | fonts: 77 | - asset: assets/fonts/GoogleSansRegular.ttf 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /lib/map/map_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:devfest_gandhinagar/config/config_bloc.dart'; 4 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 5 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 6 | 7 | class MapPage extends StatefulWidget { 8 | static const String routeName = "/map"; 9 | @override 10 | _MapPageState createState() => _MapPageState(); 11 | } 12 | 13 | class _MapPageState extends State { 14 | GoogleMapController _controller; 15 | bool isMapCreated = false; 16 | static final LatLng myLocation = LatLng(23.188500, 72.628841); 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | } 22 | 23 | final CameraPosition _kGooglePlex = CameraPosition( 24 | target: myLocation, 25 | zoom: 14.4746, 26 | ); 27 | 28 | Set _createMarker() { 29 | return [ 30 | Marker( 31 | markerId: MarkerId("marker_1"), 32 | position: myLocation, 33 | icon: BitmapDescriptor.defaultMarkerWithHue( 34 | BitmapDescriptor.hueOrange, 35 | )), 36 | ].toSet(); 37 | } 38 | 39 | changeMapMode() { 40 | if (ConfigBloc().darkModeOn) { 41 | getJsonFile("assets/nightmode.json").then(setMapStyle); 42 | } else { 43 | getJsonFile("assets/daymode.json").then(setMapStyle); 44 | } 45 | } 46 | 47 | Future getJsonFile(String path) async { 48 | return await rootBundle.loadString(path); 49 | } 50 | 51 | void setMapStyle(String mapStyle) { 52 | _controller.setMapStyle(mapStyle); 53 | } 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | if (isMapCreated) { 58 | changeMapMode(); 59 | } 60 | return DevScaffold( 61 | body: Padding( 62 | padding: const EdgeInsets.only(top: 1.0), 63 | child: Stack( 64 | fit: StackFit.expand, 65 | children: [ 66 | GoogleMap( 67 | mapType: MapType.normal, 68 | zoomGesturesEnabled: true, 69 | myLocationButtonEnabled: true, 70 | myLocationEnabled: true, 71 | markers: _createMarker(), 72 | initialCameraPosition: _kGooglePlex, 73 | onMapCreated: (GoogleMapController controller) { 74 | _controller = controller; 75 | isMapCreated = true; 76 | changeMapMode(); 77 | setState(() {}); 78 | }, 79 | ), 80 | IgnorePointer( 81 | child: Padding( 82 | padding: const EdgeInsets.all(8.0), 83 | child: RichText( 84 | textAlign: TextAlign.center, 85 | text: TextSpan( 86 | text: "DAIICT\n", 87 | style: Theme.of(context).textTheme.title.copyWith( 88 | fontWeight: FontWeight.bold, 89 | ), 90 | children: [ 91 | TextSpan( 92 | text: 93 | "Near Reliance Chowkdi, DA IICT Road,\nGandhinagar, Gujarat, India", 94 | style: Theme.of(context).textTheme.subtitle, 95 | children: []), 96 | ]), 97 | )), 98 | ) 99 | ], 100 | ), 101 | ), 102 | title: "Locate Us", 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /lib/home/home_widgets/home_sliding_panel.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | import 'package:devfest_gandhinagar/config/index.dart'; 6 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 7 | 8 | class HomeSlidingPanel extends StatefulWidget { 9 | @override 10 | _HomeSlidingPanelState createState() => _HomeSlidingPanelState(); 11 | } 12 | 13 | class _HomeSlidingPanelState extends State { 14 | GoogleMapController _controller; 15 | bool isMapCreated = false; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | } 21 | 22 | void _setMapStyle(String mapStyle) { 23 | setState(() { 24 | _controller.setMapStyle(mapStyle); 25 | }); 26 | } 27 | 28 | Future _getFileData(String path) async { 29 | return await rootBundle.loadString(path); 30 | } 31 | 32 | static final CameraPosition _kGooglePlex = CameraPosition( 33 | target: LatLng(37.42796133580664, -122.085749655962), 34 | zoom: 14.4746, 35 | ); 36 | 37 | Set _createMarker() { 38 | return [ 39 | Marker( 40 | markerId: MarkerId("marker_1"), 41 | position: LatLng(37.42796133580664, -122.085749655962), 42 | icon: BitmapDescriptor.defaultMarkerWithHue( 43 | BitmapDescriptor.hueOrange, 44 | )), 45 | ].toSet(); 46 | } 47 | 48 | // static final CameraPosition _kLake = CameraPosition( 49 | // bearing: 192.8334901395799, 50 | // target: LatLng(37.43296265331129, -122.08832357078792), 51 | // tilt: 59.440717697143555, 52 | // zoom: 14.151926040649414); 53 | 54 | changeMapMode() { 55 | if (ConfigBloc().darkModeOn) { 56 | _getFileData('assets/nightmode.json').then(_setMapStyle); 57 | } else { 58 | _getFileData('assets/daymode.json').then(_setMapStyle); 59 | } 60 | } 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | if (isMapCreated) { 65 | changeMapMode(); 66 | } 67 | return Padding( 68 | padding: const EdgeInsets.only(top: 1.0), 69 | child: Stack( 70 | fit: StackFit.expand, 71 | children: [ 72 | GoogleMap( 73 | mapType: MapType.normal, 74 | zoomGesturesEnabled: false, 75 | myLocationEnabled: true, 76 | markers: _createMarker(), 77 | initialCameraPosition: _kGooglePlex, 78 | onMapCreated: (GoogleMapController controller) { 79 | _controller = controller; 80 | isMapCreated = true; 81 | changeMapMode(); 82 | setState(() {}); 83 | }, 84 | ), 85 | IgnorePointer( 86 | child: Padding( 87 | padding: const EdgeInsets.all(8.0), 88 | child: RichText( 89 | textAlign: TextAlign.center, 90 | text: TextSpan( 91 | text: "Google Office\n", 92 | style: Theme.of(context).textTheme.title.copyWith( 93 | fontWeight: FontWeight.bold, 94 | ), 95 | children: [ 96 | TextSpan( 97 | text: "Shoreline Amphitheatre, Mountain View, CA", 98 | style: Theme.of(context).textTheme.subtitle, 99 | children: []), 100 | ]), 101 | )), 102 | ) 103 | ], 104 | ), 105 | ); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /lib/config/config_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/id/id_page.dart'; 2 | import 'package:devfest_gandhinagar/signin/signin_page.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | import 'package:devfest_gandhinagar/agenda/agenda_page.dart'; 6 | import 'package:devfest_gandhinagar/config/index.dart'; 7 | import 'package:devfest_gandhinagar/faq/faq_page.dart'; 8 | import 'package:devfest_gandhinagar/feedback/feedback_page.dart'; 9 | import 'package:devfest_gandhinagar/find_devfest/find_devfest_page.dart'; 10 | import 'package:devfest_gandhinagar/home/home_page.dart'; 11 | import 'package:devfest_gandhinagar/map/map_page.dart'; 12 | import 'package:devfest_gandhinagar/speakers/speaker_page.dart'; 13 | import 'package:devfest_gandhinagar/sponsors/sponsor_page.dart'; 14 | import 'package:devfest_gandhinagar/team/team_page.dart'; 15 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 16 | 17 | class ConfigPage extends StatefulWidget { 18 | static const String routeName = "/"; 19 | @override 20 | _ConfigPageState createState() => _ConfigPageState(); 21 | } 22 | 23 | class _ConfigPageState extends State { 24 | ConfigBloc configBloc; 25 | 26 | @override 27 | void initState() { 28 | super.initState(); 29 | setupApp(); 30 | } 31 | 32 | setupApp() { 33 | configBloc = ConfigBloc(); 34 | configBloc.darkModeOn = 35 | Devfest.prefs.getBool(Devfest.darkModePref) ?? false; 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return BlocProvider( 41 | builder: (context) => configBloc, 42 | child: BlocBuilder( 43 | builder: (context, state) { 44 | return MaterialApp( 45 | title: 'Google Devfest', 46 | debugShowCheckedModeBanner: false, 47 | theme: ThemeData( 48 | //* Custom Google Font 49 | fontFamily: Devfest.google_sans_family, 50 | primarySwatch: Colors.red, 51 | primaryColor: configBloc.darkModeOn ? Colors.black : Colors.white, 52 | disabledColor: Colors.grey, 53 | cardColor: configBloc.darkModeOn ? Colors.black : Colors.white, 54 | canvasColor: 55 | configBloc.darkModeOn ? Colors.black : Colors.grey[50], 56 | brightness: 57 | configBloc.darkModeOn ? Brightness.dark : Brightness.light, 58 | buttonColor: 59 | configBloc.darkModeOn ? Colors.blueGrey : Colors.lightGreen, 60 | // buttonTheme: Theme.of(context).buttonTheme.copyWith( 61 | // colorScheme: configBloc.darkModeOn 62 | // ? ColorScheme.dark() 63 | // : ColorScheme.light()), 64 | appBarTheme: AppBarTheme( 65 | elevation: 0.0, 66 | ), 67 | ), 68 | home: SignInPage(), 69 | routes: { 70 | HomePage.routeName: (context) => HomePage(), 71 | SpeakerPage.routeName: (context) => SpeakerPage(), 72 | AgendaPage.routeName: (context) => AgendaPage(), 73 | SponsorPage.routeName: (context) => SponsorPage(), 74 | TeamPage.routeName: (context) => TeamPage(), 75 | FaqPage.routeName: (context) => FaqPage(), 76 | FeedbackPage.routeName: (context) => FeedbackPage(), 77 | FindDevFestPage.routeName: (context) => FindDevFestPage(), 78 | MapPage.routeName: (context) => MapPage(), 79 | IDPage.routeName: (context) => IDPage(), 80 | }, 81 | ); 82 | }, 83 | ), 84 | ); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/utils/devfest.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | class Devfest { 5 | static const String app_name = "Devfest GDG Gandhinagar"; 6 | static const String app_version = "Version 1.4.2"; 7 | static const int app_version_code = 6; 8 | static const String app_color = "#ffd7167"; 9 | static Color primaryAppColor = Colors.white; 10 | static Color secondaryAppColor = Colors.black; 11 | static const String google_sans_family = "GoogleSans"; 12 | static bool isDebugMode = false; 13 | 14 | // * Url related 15 | static String baseUrl = "https://storage.googleapis.com/gdg-devfest"; 16 | 17 | static checkDebug() { 18 | assert(() { 19 | // baseUrl = "http://127.0.0.1:8000/gdg-devfest/"; 20 | // * Change with your local url if any 21 | baseUrl = "https://storage.googleapis.com/gdg-devfest"; 22 | isDebugMode = true; 23 | return true; 24 | }()); 25 | } 26 | 27 | static bool get checkDebugBool { 28 | var debug = false; 29 | assert(debug = true); 30 | 31 | return debug; 32 | } 33 | 34 | //* Images 35 | static const String home_img = "assets/images/home_img.jpeg"; 36 | static const String banner_light = "assets/images/banner_light.jpg"; 37 | static const String banner_dark = "assets/images/banner_dark.jpg"; 38 | 39 | //* Texts 40 | static const String welcomeText = "DevFest Gandhinagar 2019"; 41 | static const String descText = 42 | '''DevFests are community-led, developer events hosted by GDG chapters around the globe focused on community building & learning about Google’s technologies. Each DevFest is inspired by and uniquely tailored to the needs of the developer community and region that hosts it.'''; 43 | 44 | static const String loading_text = "Loading..."; 45 | static const String try_again_text = "Try Again"; 46 | static const String some_error_text = "Some error"; 47 | static const String signInText = "Sign In"; 48 | static const String signInGoogleText = "Sign in with google"; 49 | static const String signOutText = "Sign Out"; 50 | static const String wrongText = "Something went wrong"; 51 | static const String confirmText = "Confirm"; 52 | static const String supportText = "Support Needed"; 53 | static const String featureText = "Feature Request"; 54 | static const String moreFeatureText = "More Features coming soon."; 55 | static const String comingSoonText = "More Details coming soon."; 56 | static const String updateNowText = 57 | "Please update your app for seamless experience."; 58 | static const String checkNetText = 59 | "It seems like your internet connection is not active."; 60 | 61 | //* ActionTexts 62 | static const String agenda_text = "Agenda"; 63 | static const String speakers_text = "Speakers"; 64 | static const String team_text = "Team"; 65 | static const String sponsor_text = "Sponsors"; 66 | static const String faq_text = "FAQ"; 67 | static const String map_text = "Navigate to Us"; 68 | static const String feedback_text = "Feedback"; 69 | static const String show_id_text = "Show ID"; 70 | 71 | //* Preferences 72 | static SharedPreferences prefs; 73 | static const String loggedInPref = "loggedInPref1"; 74 | static const String uidPref = "uidPref"; 75 | static const String displayNamePref = "displayNamePref"; 76 | static const String emailPref = "emailPref"; 77 | static const String phonePref = "phonePref"; 78 | static const String photoPref = "photoPref"; 79 | static const String isAdminPref = "isAdminPref"; 80 | static const String darkModePref = "darkModePref"; 81 | static const String isUpdatedPref = "isUpdatedPref"; 82 | static const String recommendedVersionPref = "recommendedVersionPref"; 83 | } 84 | -------------------------------------------------------------------------------- /lib/sponsors/sponsor_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:cached_network_image/cached_network_image.dart'; 3 | import 'package:devfest_gandhinagar/dialogs/error_dialog.dart'; 4 | import 'package:devfest_gandhinagar/home/sponsor.dart'; 5 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 6 | import 'package:devfest_gandhinagar/utils/tools.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 9 | import 'package:cloud_firestore/cloud_firestore.dart'; 10 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 11 | import 'package:url_launcher/url_launcher.dart'; 12 | 13 | class SponsorPage extends StatelessWidget { 14 | static const String routeName = "/sponsor"; 15 | static List sponsorsList = new List(); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return DevScaffold( 20 | title: "Sponsors", 21 | body: Container( 22 | color: Colors.black, 23 | child: FutureBuilder( 24 | future: 25 | Firestore.instance.collection("homepage").document("data").get(), 26 | builder: 27 | (BuildContext context, AsyncSnapshot snapshot) { 28 | if (snapshot.connectionState != ConnectionState.done) { 29 | return Container( 30 | color: Theme.of(context).scaffoldBackgroundColor, 31 | child: Center( 32 | child: SpinKitChasingDots( 33 | color: Tools.multiColors[Random().nextInt(3)], 34 | ), 35 | ), 36 | ); 37 | } else { 38 | if (snapshot.hasError) { 39 | return Center( 40 | child: ErrorDialog( 41 | error: snapshot.error, 42 | child: Text(Devfest.some_error_text), 43 | ), 44 | ); 45 | } else { 46 | Map> map = 47 | Map>.from( 48 | snapshot.data.data["sponsors"]); 49 | 50 | int count = 0; 51 | for (int i = 0; i < map.length; i++) { 52 | String sponsorCategory = map.keys.toList()[i]; 53 | for (int j = 0; j < map[sponsorCategory].length; j++) { 54 | sponsorsList.add( 55 | Sponsor.fromJson(Map.from(map[sponsorCategory][j]))); 56 | count++; 57 | } 58 | } 59 | if (sponsorsList.length < 1) { 60 | return Center( 61 | child: Text(Devfest.comingSoonText), 62 | ); 63 | } 64 | return ListView.builder( 65 | itemCount: count, 66 | itemBuilder: (BuildContext context, int i) { 67 | return SponsorImage( 68 | imgUrl: sponsorsList[i].image, 69 | url: sponsorsList[i].url, 70 | ); 71 | }, 72 | ); 73 | } 74 | } 75 | }, 76 | ), 77 | ), 78 | ); 79 | } 80 | } 81 | 82 | class SponsorImage extends StatelessWidget { 83 | final String imgUrl; 84 | final String url; 85 | 86 | const SponsorImage({Key key, this.imgUrl, this.url}) : super(key: key); 87 | @override 88 | Widget build(BuildContext context) { 89 | return GestureDetector( 90 | onTap: () { 91 | launch(url); 92 | }, 93 | child: Card( 94 | color: Colors.transparent, 95 | elevation: 0.0, 96 | child: Padding( 97 | padding: const EdgeInsets.all(12.0), 98 | child: CachedNetworkImage( 99 | imageUrl: imgUrl, 100 | height: 200.0, 101 | width: 200.0, 102 | fit: BoxFit.contain, 103 | ), 104 | ), 105 | ), 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/feedback/feedback_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 5 | 6 | class FeedbackPage extends StatefulWidget { 7 | static const String routeName = "/feedback"; 8 | @override 9 | _FeedbackPageState createState() => _FeedbackPageState(); 10 | } 11 | 12 | class _FeedbackPageState extends State { 13 | TextEditingController _feedbackControler = TextEditingController(); 14 | int _starRating = 5; 15 | GlobalKey _formKey = GlobalKey(); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return DevScaffold( 20 | title: "Feedback", 21 | body: Padding( 22 | padding: const EdgeInsets.only(top: 1.0), 23 | child: Stack( 24 | fit: StackFit.expand, 25 | children: [ 26 | Padding( 27 | padding: const EdgeInsets.all(8.0), 28 | child: SingleChildScrollView( 29 | child: Form( 30 | key: _formKey, 31 | autovalidate: true, 32 | child: Column( 33 | mainAxisAlignment: MainAxisAlignment.start, 34 | children: [ 35 | Padding( 36 | padding: const EdgeInsets.all(30.0), 37 | child: _starRowBuilder(), 38 | ), 39 | Padding( 40 | padding: const EdgeInsets.symmetric( 41 | horizontal: 2, vertical: 25), 42 | child: TextFormField( 43 | autocorrect: true, 44 | controller: _feedbackControler, 45 | maxLines: 5, 46 | keyboardType: TextInputType.text, 47 | textCapitalization: TextCapitalization.sentences, 48 | textInputAction: TextInputAction.done, 49 | decoration: InputDecoration( 50 | contentPadding: EdgeInsets.all(5), 51 | hintText: "We'd love to hear from you !", 52 | focusedBorder: OutlineInputBorder( 53 | borderRadius: 54 | BorderRadius.all(Radius.circular(20.0)), 55 | ), 56 | border: OutlineInputBorder( 57 | borderRadius: 58 | BorderRadius.all(Radius.circular(20.0)), 59 | ), 60 | ), 61 | ), 62 | ), 63 | RaisedButton( 64 | child: Text("Submit"), 65 | onPressed: _validateAndSave, 66 | ), 67 | ], 68 | ), 69 | ), 70 | ), 71 | ), 72 | ], 73 | ), 74 | ), 75 | ); 76 | } 77 | 78 | Widget _starRowBuilder() { 79 | return Row( 80 | mainAxisAlignment: MainAxisAlignment.center, 81 | children: [ 82 | _starBuilder(1), 83 | _starBuilder(2), 84 | _starBuilder(3), 85 | _starBuilder(4), 86 | _starBuilder(5), 87 | ], 88 | ); 89 | } 90 | 91 | Widget _starBuilder(int _starnumber) { 92 | return IconButton( 93 | onPressed: () { 94 | setState(() { 95 | _starRating = _starnumber; 96 | }); 97 | }, 98 | icon: _starnumber <= _starRating 99 | ? Icon(Icons.star, color: Color.fromARGB(255, 212, 175, 55)) 100 | : Icon(Icons.star_border), 101 | ); 102 | } 103 | 104 | void _validateAndSave() async { 105 | if (_formKey.currentState.validate() == true) { 106 | _formKey.currentState.save(); 107 | 108 | await Firestore.instance 109 | .collection("feedbacks") 110 | .document(DateTime.now().millisecondsSinceEpoch.toString()) 111 | .setData({ 112 | "feedback": _feedbackControler.text, 113 | "name": Devfest.prefs.getString(Devfest.displayNamePref), 114 | "email": Devfest.prefs.getString(Devfest.emailPref), 115 | "time": DateTime.now().toIso8601String(), 116 | "stars": _starRating, 117 | }); 118 | _feedbackControler.clear(); 119 | Navigator.pop(context); 120 | } else { 121 | print("Form data NOT saved"); 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /assets/nightmode.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "elementType": "geometry", 4 | "stylers": [ 5 | { 6 | "color": "#1d2c4d" 7 | } 8 | ] 9 | }, 10 | { 11 | "elementType": "labels.text.fill", 12 | "stylers": [ 13 | { 14 | "color": "#8ec3b9" 15 | } 16 | ] 17 | }, 18 | { 19 | "elementType": "labels.text.stroke", 20 | "stylers": [ 21 | { 22 | "color": "#1a3646" 23 | } 24 | ] 25 | }, 26 | { 27 | "featureType": "administrative.country", 28 | "elementType": "geometry.stroke", 29 | "stylers": [ 30 | { 31 | "color": "#4b6878" 32 | } 33 | ] 34 | }, 35 | { 36 | "featureType": "administrative.land_parcel", 37 | "elementType": "labels.text.fill", 38 | "stylers": [ 39 | { 40 | "color": "#64779e" 41 | } 42 | ] 43 | }, 44 | { 45 | "featureType": "administrative.province", 46 | "elementType": "geometry.stroke", 47 | "stylers": [ 48 | { 49 | "color": "#4b6878" 50 | } 51 | ] 52 | }, 53 | { 54 | "featureType": "landscape.man_made", 55 | "elementType": "geometry.stroke", 56 | "stylers": [ 57 | { 58 | "color": "#334e87" 59 | } 60 | ] 61 | }, 62 | { 63 | "featureType": "landscape.natural", 64 | "elementType": "geometry", 65 | "stylers": [ 66 | { 67 | "color": "#023e58" 68 | } 69 | ] 70 | }, 71 | { 72 | "featureType": "poi", 73 | "elementType": "geometry", 74 | "stylers": [ 75 | { 76 | "color": "#283d6a" 77 | } 78 | ] 79 | }, 80 | { 81 | "featureType": "poi", 82 | "elementType": "labels.text.fill", 83 | "stylers": [ 84 | { 85 | "color": "#6f9ba5" 86 | } 87 | ] 88 | }, 89 | { 90 | "featureType": "poi", 91 | "elementType": "labels.text.stroke", 92 | "stylers": [ 93 | { 94 | "color": "#1d2c4d" 95 | } 96 | ] 97 | }, 98 | { 99 | "featureType": "poi.park", 100 | "elementType": "geometry.fill", 101 | "stylers": [ 102 | { 103 | "color": "#023e58" 104 | } 105 | ] 106 | }, 107 | { 108 | "featureType": "poi.park", 109 | "elementType": "labels.text.fill", 110 | "stylers": [ 111 | { 112 | "color": "#3C7680" 113 | } 114 | ] 115 | }, 116 | { 117 | "featureType": "road", 118 | "elementType": "geometry", 119 | "stylers": [ 120 | { 121 | "color": "#304a7d" 122 | } 123 | ] 124 | }, 125 | { 126 | "featureType": "road", 127 | "elementType": "labels.text.fill", 128 | "stylers": [ 129 | { 130 | "color": "#98a5be" 131 | } 132 | ] 133 | }, 134 | { 135 | "featureType": "road", 136 | "elementType": "labels.text.stroke", 137 | "stylers": [ 138 | { 139 | "color": "#1d2c4d" 140 | } 141 | ] 142 | }, 143 | { 144 | "featureType": "road.highway", 145 | "elementType": "geometry", 146 | "stylers": [ 147 | { 148 | "color": "#2c6675" 149 | } 150 | ] 151 | }, 152 | { 153 | "featureType": "road.highway", 154 | "elementType": "geometry.stroke", 155 | "stylers": [ 156 | { 157 | "color": "#255763" 158 | } 159 | ] 160 | }, 161 | { 162 | "featureType": "road.highway", 163 | "elementType": "labels.text.fill", 164 | "stylers": [ 165 | { 166 | "color": "#b0d5ce" 167 | } 168 | ] 169 | }, 170 | { 171 | "featureType": "road.highway", 172 | "elementType": "labels.text.stroke", 173 | "stylers": [ 174 | { 175 | "color": "#023e58" 176 | } 177 | ] 178 | }, 179 | { 180 | "featureType": "transit", 181 | "elementType": "labels.text.fill", 182 | "stylers": [ 183 | { 184 | "color": "#98a5be" 185 | } 186 | ] 187 | }, 188 | { 189 | "featureType": "transit", 190 | "elementType": "labels.text.stroke", 191 | "stylers": [ 192 | { 193 | "color": "#1d2c4d" 194 | } 195 | ] 196 | }, 197 | { 198 | "featureType": "transit.line", 199 | "elementType": "geometry.fill", 200 | "stylers": [ 201 | { 202 | "color": "#283d6a" 203 | } 204 | ] 205 | }, 206 | { 207 | "featureType": "transit.station", 208 | "elementType": "geometry", 209 | "stylers": [ 210 | { 211 | "color": "#3a4762" 212 | } 213 | ] 214 | }, 215 | { 216 | "featureType": "water", 217 | "elementType": "geometry", 218 | "stylers": [ 219 | { 220 | "color": "#0e1626" 221 | } 222 | ] 223 | }, 224 | { 225 | "featureType": "water", 226 | "elementType": "labels.text.fill", 227 | "stylers": [ 228 | { 229 | "color": "#4e6d70" 230 | } 231 | ] 232 | } 233 | ] -------------------------------------------------------------------------------- /lib/agenda/agenda_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:devfest_gandhinagar/agenda/cloud_screen.dart'; 5 | import 'package:devfest_gandhinagar/dialogs/error_dialog.dart'; 6 | import 'package:devfest_gandhinagar/home/speaker.dart'; 7 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:devfest_gandhinagar/agenda/mobile_screen.dart'; 10 | import 'package:devfest_gandhinagar/agenda/web_screen.dart'; 11 | import 'package:devfest_gandhinagar/home/index.dart'; 12 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 13 | import 'package:devfest_gandhinagar/utils/tools.dart'; 14 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 15 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 16 | 17 | class AgendaPage extends StatelessWidget { 18 | static const String routeName = "/agenda"; 19 | static List sessionList; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | var _homeBloc = HomeBloc(); 24 | return DefaultTabController( 25 | length: 3, 26 | child: DevScaffold( 27 | title: "Agenda", 28 | tabBar: TabBar( 29 | indicatorSize: TabBarIndicatorSize.label, 30 | indicatorColor: Tools.multiColors[Random().nextInt(4)], 31 | labelStyle: TextStyle( 32 | fontSize: 12, 33 | ), 34 | isScrollable: false, 35 | tabs: [ 36 | Tab( 37 | child: Text("Web"), 38 | icon: Icon( 39 | FontAwesomeIcons.chrome, 40 | size: 12, 41 | ), 42 | ), 43 | Tab( 44 | child: Text("Mobile & ML"), 45 | icon: Icon( 46 | FontAwesomeIcons.mobile, 47 | size: 12, 48 | ), 49 | ), 50 | Tab( 51 | child: Text("Cloud & Misc"), 52 | icon: Icon( 53 | FontAwesomeIcons.cloud, 54 | size: 12, 55 | ), 56 | ), 57 | ], 58 | ), 59 | body: FutureBuilder( 60 | future: 61 | Firestore.instance.collection("speakers").document("data").get(), 62 | builder: 63 | (BuildContext context, AsyncSnapshot snapshot) { 64 | if (snapshot.connectionState != ConnectionState.done) { 65 | return Container( 66 | color: Theme.of(context).scaffoldBackgroundColor, 67 | child: Center( 68 | child: SpinKitChasingDots( 69 | color: Tools.multiColors[Random().nextInt(3)], 70 | ), 71 | ), 72 | ); 73 | } else { 74 | if (snapshot.hasError) { 75 | return Center( 76 | child: ErrorDialog( 77 | child: Text(Devfest.some_error_text), 78 | error: snapshot.error, 79 | ), 80 | ); 81 | } else { 82 | sessionList = List(); 83 | // for (int i = 0; i < snapshot.data.documents.length; i++) { 84 | // sessionList 85 | // .add(Session.fromJson(snapshot.data.documents[i].data)); 86 | // } 87 | for (int i = 0; i < snapshot.data.data["data"].length; i++) { 88 | if (Speaker.fromJson(Map.from( 89 | snapshot.data.data["data"][i])) 90 | .isVisible == 91 | true) 92 | sessionList.add(Speaker.fromJson(Map.from( 93 | snapshot.data.data["data"][i]))); 94 | } 95 | 96 | sessionList.sort((a, b) { 97 | return a.sessionId.compareTo(b.sessionId); 98 | }); 99 | 100 | return TabBarView( 101 | children: [ 102 | WebScreen( 103 | key: UniqueKey(), 104 | homeBloc: _homeBloc, 105 | sessions: sessionList, 106 | ), 107 | MobileScreen( 108 | key: UniqueKey(), 109 | homeBloc: _homeBloc, 110 | sessions: sessionList, 111 | ), 112 | MLScreen( 113 | key: UniqueKey(), 114 | homeBloc: _homeBloc, 115 | sessions: sessionList, 116 | ), 117 | ], 118 | ); 119 | } 120 | } 121 | }, 122 | ), 123 | ), 124 | ); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /lib/home/speaker.dart: -------------------------------------------------------------------------------- 1 | class SpeakersData { 2 | List speakers; 3 | 4 | SpeakersData({this.speakers}); 5 | 6 | SpeakersData.fromJson(Map json) { 7 | if (json['speakers'] != null) { 8 | speakers = new List(); 9 | json['speakers'].forEach((v) { 10 | speakers.add(Speaker.fromJson(v)); 11 | }); 12 | } 13 | } 14 | 15 | Map toJson() { 16 | final Map data = new Map(); 17 | if (this.speakers != null) { 18 | data['speakers'] = this.speakers.map((v) => v.toJson()).toList(); 19 | } 20 | return data; 21 | } 22 | } 23 | 24 | class Speaker { 25 | String speakerName; 26 | String speakerDesc; 27 | String speakerImage; 28 | // String speakerInfo; 29 | int speakerId; 30 | String fbUrl; 31 | String twitterUrl; 32 | String linkedinUrl; 33 | String githubUrl; 34 | String speakerSession; 35 | int sessionId; 36 | String sessionDetail; 37 | String speakerBio; 38 | String track; 39 | bool isFeatured; 40 | bool isVisible; 41 | String company; 42 | String sessionLevel; 43 | String startTime; 44 | String totalTime; 45 | int index; 46 | 47 | Speaker({ 48 | this.speakerName, 49 | this.speakerDesc, 50 | this.speakerImage, 51 | // this.speakerInfo, 52 | this.speakerId, 53 | this.fbUrl, 54 | this.twitterUrl, 55 | this.linkedinUrl, 56 | this.githubUrl, 57 | this.speakerSession, 58 | this.sessionId, 59 | this.sessionDetail, 60 | this.speakerBio, 61 | this.isFeatured, 62 | this.isVisible, 63 | this.track, 64 | this.company, 65 | this.sessionLevel, 66 | this.startTime, 67 | this.totalTime, 68 | this.index, 69 | }); 70 | 71 | Speaker.fromJson(Map json) { 72 | speakerName = json['speaker_name']; 73 | speakerDesc = json['speaker_desc']; 74 | speakerImage = json['speaker_image']; 75 | // speakerInfo = json['speaker_info']; 76 | speakerId = json['speaker_id']; 77 | fbUrl = json['fb_url']; 78 | twitterUrl = json['twitter_url']; 79 | linkedinUrl = json['linkedin_url']; 80 | githubUrl = json['github_url']; 81 | speakerSession = json['speaker_session']; 82 | sessionId = json['session_id']; 83 | sessionDetail = json["session_details"]; 84 | speakerBio = json["speaker_bio"]; 85 | isFeatured = json["is_featured"]; 86 | isVisible = json["show"]; 87 | track = json["track"]; 88 | company = json["company"]; 89 | sessionLevel = json["session_level"]; 90 | startTime = json["start_time"]; 91 | totalTime = json["total_time"]; 92 | index = json["index"]; 93 | } 94 | 95 | Map toJson() { 96 | final Map data = new Map(); 97 | data['speaker_name'] = this.speakerName; 98 | data['speaker_desc'] = this.speakerDesc; 99 | data['speaker_image'] = this.speakerImage; 100 | // data['speaker_info'] = this.speakerInfo; 101 | data['speaker_id'] = this.speakerId; 102 | data['fb_url'] = this.fbUrl; 103 | data['twitter_url'] = this.twitterUrl; 104 | data['linkedin_url'] = this.linkedinUrl; 105 | data['github_url'] = this.githubUrl; 106 | data['speaker_session'] = this.speakerSession; 107 | data['session_id'] = this.sessionId; 108 | data["session_details"] = this.sessionDetail; 109 | data["speaker_bio"] = this.speakerBio; 110 | data["is_featured"] = this.isFeatured; 111 | data["show"] = this.isVisible; 112 | data["track"] = this.track; 113 | data["company"] = this.company; 114 | data["session_level"] = this.sessionLevel; 115 | data["start_time"] = this.startTime; 116 | data["total_time"] = this.totalTime; 117 | data["index"] = this.index; 118 | return data; 119 | } 120 | } 121 | 122 | List speakers = [ 123 | Speaker( 124 | speakerImage: "https://github.com/parth181195.png", 125 | speakerName: "Parth Jansari", 126 | speakerDesc: "Organizer, GDG Gandhinagar", 127 | speakerSession: "Flutterverse Gujarat", 128 | fbUrl: "https://facebook.com/", 129 | githubUrl: "https://github.com/parth181195", 130 | linkedinUrl: "https://linkedin.com/in/", 131 | twitterUrl: "https://twitter.com/", 132 | ), 133 | Speaker( 134 | speakerImage: "https://github.com/parth181195.png", 135 | speakerName: "Parth Jansari", 136 | speakerDesc: "Organizer, GDG Gandhinagar", 137 | speakerSession: "Flutterverse Gujarat", 138 | fbUrl: "https://facebook.com/", 139 | githubUrl: "https://github.com/parth181195", 140 | linkedinUrl: "https://linkedin.com/in/", 141 | twitterUrl: "https://twitter.com/", 142 | ), 143 | Speaker( 144 | speakerImage: "https://github.com/parth181195.png", 145 | speakerName: "Parth Jansari", 146 | speakerDesc: "Organizer, GDG Gandhinagar", 147 | speakerSession: "Flutterverse Gujarat", 148 | fbUrl: "https://facebook.com/", 149 | githubUrl: "https://github.com/parth181195", 150 | linkedinUrl: "https://linkedin.com/in/", 151 | twitterUrl: "https://twitter.com/", 152 | ), 153 | Speaker( 154 | speakerImage: "https://github.com/parth181195.png", 155 | speakerName: "Parth Jansari", 156 | speakerDesc: "Organizer, GDG Gandhinagar", 157 | speakerSession: "Flutterverse Gujarat", 158 | fbUrl: "https://facebook.com/", 159 | githubUrl: "https://github.com/parth181195", 160 | linkedinUrl: "https://linkedin.com/in/", 161 | twitterUrl: "https://twitter.com/", 162 | ), 163 | Speaker( 164 | speakerImage: "https://github.com/parth181195.png", 165 | speakerName: "Parth Jansari", 166 | speakerDesc: "Organizer, GDG Gandhinagar", 167 | speakerSession: "Flutterverse Gujarat", 168 | fbUrl: "https://facebook.com/", 169 | githubUrl: "https://github.com/parth181195", 170 | linkedinUrl: "https://linkedin.com/in/", 171 | twitterUrl: "https://twitter.com/", 172 | ), 173 | ]; 174 | -------------------------------------------------------------------------------- /lib/agenda/session_detail.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:cached_network_image/cached_network_image.dart'; 3 | import 'package:cloud_firestore/cloud_firestore.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:devfest_gandhinagar/home/speaker.dart'; 6 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 7 | import 'package:devfest_gandhinagar/utils/tools.dart'; 8 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 9 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 10 | import 'package:url_launcher/url_launcher.dart'; 11 | 12 | class SessionDetail extends StatelessWidget { 13 | static const String routeName = "/session_detail"; 14 | final Speaker session; 15 | static Speaker speaker = Speaker(); 16 | static List speakerList; 17 | 18 | SessionDetail({Key key, @required this.session}) : super(key: key); 19 | 20 | Widget socialActions(context) => FittedBox( 21 | child: Row( 22 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 23 | children: [ 24 | IconButton( 25 | icon: Icon( 26 | FontAwesomeIcons.facebookF, 27 | size: 15, 28 | ), 29 | onPressed: () { 30 | launch(speaker.fbUrl); 31 | }, 32 | ), 33 | IconButton( 34 | icon: Icon( 35 | FontAwesomeIcons.twitter, 36 | size: 15, 37 | ), 38 | onPressed: () { 39 | launch(speaker.twitterUrl); 40 | }, 41 | ), 42 | IconButton( 43 | icon: Icon( 44 | FontAwesomeIcons.linkedinIn, 45 | size: 15, 46 | ), 47 | onPressed: () { 48 | launch(speaker.linkedinUrl); 49 | }, 50 | ), 51 | IconButton( 52 | icon: Icon( 53 | FontAwesomeIcons.github, 54 | size: 15, 55 | ), 56 | onPressed: () { 57 | launch(speaker.githubUrl); 58 | }, 59 | ), 60 | ], 61 | ), 62 | ); 63 | 64 | @override 65 | Widget build(BuildContext context) { 66 | // var _homeBloc = HomeBloc(); 67 | speakerList = List(); 68 | return DevScaffold( 69 | title: session.speakerName, 70 | body: FutureBuilder( 71 | future: 72 | Firestore.instance.collection("speakers").document("data").get(), 73 | builder: 74 | (BuildContext context, AsyncSnapshot snapshot) { 75 | if (snapshot.connectionState != ConnectionState.done && 76 | snapshot.connectionState != ConnectionState.active) { 77 | return Container( 78 | color: Theme.of(context).scaffoldBackgroundColor, 79 | child: Center( 80 | child: SpinKitChasingDots( 81 | color: Tools.multiColors[Random().nextInt(3)], 82 | ), 83 | ), 84 | ); 85 | } else { 86 | for (int i = 0; i < snapshot.data.data["data"].length; i++) { 87 | speakerList.add(Speaker.fromJson( 88 | Map.from(snapshot.data.data["data"][i]))); 89 | if (speakerList[i].speakerId == session.speakerId) { 90 | speaker = speakerList[i]; 91 | } 92 | } 93 | 94 | speakerList.sort((a, b) { 95 | return a.speakerId.compareTo(b.speakerId); 96 | }); 97 | 98 | return SingleChildScrollView( 99 | child: Padding( 100 | padding: const EdgeInsets.all(18.0), 101 | child: Column( 102 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 103 | children: [ 104 | Center( 105 | child: Hero( 106 | tag: speaker.speakerImage, 107 | child: CircleAvatar( 108 | radius: 100.0, 109 | backgroundImage: CachedNetworkImageProvider( 110 | speaker.speakerImage, 111 | ), 112 | ), 113 | ), 114 | ), 115 | SizedBox( 116 | height: 10, 117 | ), 118 | Text( 119 | "${speaker.speakerDesc}", 120 | textAlign: TextAlign.center, 121 | style: Theme.of(context).textTheme.title.copyWith( 122 | fontSize: 14, 123 | color: Tools.multiColors[Random().nextInt(4)], 124 | ), 125 | ), 126 | SizedBox( 127 | height: 20, 128 | ), 129 | Text( 130 | "${speaker.speakerSession}", 131 | textAlign: TextAlign.center, 132 | style: Theme.of(context).textTheme.title.copyWith( 133 | fontSize: 20, 134 | fontWeight: FontWeight.bold, 135 | ), 136 | ), 137 | SizedBox( 138 | height: 10, 139 | ), 140 | Text( 141 | "${speaker.sessionDetail}", 142 | textAlign: TextAlign.justify, 143 | style: Theme.of(context) 144 | .textTheme 145 | .caption 146 | .copyWith(fontSize: 13), 147 | ), 148 | SizedBox( 149 | height: 20, 150 | ), 151 | socialActions(context), 152 | ], 153 | ), 154 | ), 155 | ); 156 | } 157 | }, 158 | ), 159 | ); 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /lib/id/id_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:devfest_gandhinagar/config/index.dart'; 2 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 3 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:qr_flutter/qr_flutter.dart'; 6 | 7 | class IDPage extends StatelessWidget { 8 | static const String routeName = "/id"; 9 | @override 10 | Widget build(BuildContext context) { 11 | return DevScaffold( 12 | title: "Your ID", 13 | body: Container( 14 | color: ConfigBloc().darkModeOn ? Colors.grey[800] : Colors.white, 15 | // decoration: BoxDecoration( 16 | // border: Border.all(), 17 | // borderRadius: BorderRadius.all(Radius.circular(50)), // 18 | // ), 19 | // padding: EdgeInsets.all(2), 20 | child: Stack( 21 | // fit: StackFit., 22 | children: [ 23 | Positioned( 24 | // top: -1 * MediaQuery.of(context).size.height * 0.07, 25 | // right: -1 * MediaQuery.of(context).size.width * 0.08, 26 | // width: MediaQuery.of(context).size.width * 1.1, 27 | // child: Image.asset("assets/images/id_card/Asset 15@4x.png"), 28 | child: CustomPaint( 29 | painter: BGCircle( 30 | xCircle: MediaQuery.of(context).size.width / 100, 31 | yCircle: -1 * MediaQuery.of(context).size.height / 3.5, 32 | radius: MediaQuery.of(context).size.height / 1.5, 33 | ), 34 | ), 35 | ), 36 | Positioned( 37 | width: MediaQuery.of(context).size.width * 0.4, 38 | top: -1 * MediaQuery.of(context).size.height * 0.08, 39 | right: -1 * MediaQuery.of(context).size.width * 0.28, 40 | child: Image.asset("assets/images/id_card/Asset 1@4x.png"), 41 | ), 42 | Positioned( 43 | width: MediaQuery.of(context).size.width * 0.05, 44 | top: MediaQuery.of(context).size.height * 0.1, 45 | right: MediaQuery.of(context).size.width * 0.22, 46 | child: Image.asset("assets/images/id_card/Asset 3@4x.png"), 47 | ), 48 | Positioned( 49 | width: MediaQuery.of(context).size.width * 0.23, 50 | top: -1 * MediaQuery.of(context).size.height * 0.085, 51 | left: MediaQuery.of(context).size.width * 0.07, 52 | child: Image.asset("assets/images/id_card/Asset 9@4x.png"), 53 | ), 54 | Positioned( 55 | width: MediaQuery.of(context).size.width * 0.1, 56 | top: MediaQuery.of(context).size.height * 0.18, 57 | left: MediaQuery.of(context).size.width * 0.78, 58 | child: Image.asset("assets/images/id_card/Asset 4@4x.png"), 59 | ), 60 | Positioned( 61 | width: MediaQuery.of(context).size.width * 0.03, 62 | top: MediaQuery.of(context).size.height * 0.18, 63 | left: MediaQuery.of(context).size.width * 0.163, 64 | child: Image.asset("assets/images/id_card/Asset 7@4x.png"), 65 | ), 66 | Positioned( 67 | width: MediaQuery.of(context).size.width * 0.1, 68 | top: MediaQuery.of(context).size.height * 0.25, 69 | left: -1 * MediaQuery.of(context).size.width * 0.03, 70 | child: Image.asset("assets/images/id_card/Asset 5@4x.png"), 71 | ), 72 | Positioned( 73 | width: MediaQuery.of(context).size.width * 0.015, 74 | top: MediaQuery.of(context).size.height * 0.06, 75 | right: MediaQuery.of(context).size.width * 0.177, 76 | child: Image.asset("assets/images/id_card/Asset 7@4x.png"), 77 | ), 78 | Positioned( 79 | width: MediaQuery.of(context).size.width * 0.08, 80 | top: MediaQuery.of(context).size.height * 0.1, 81 | left: -1 * MediaQuery.of(context).size.width * 0.02, 82 | child: Image.asset("assets/images/id_card/Asset 8@4x.png"), 83 | ), 84 | Column( 85 | crossAxisAlignment: CrossAxisAlignment.center, 86 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 87 | children: [ 88 | Column( 89 | mainAxisAlignment: MainAxisAlignment.end, 90 | crossAxisAlignment: CrossAxisAlignment.center, 91 | children: [ 92 | Image.asset( 93 | "assets/images/devfest_logo_dark.png", 94 | scale: 1.7, 95 | ), 96 | SizedBox( 97 | height: 30, 98 | ), 99 | CircleAvatar( 100 | radius: 75, 101 | child: 102 | Image.asset("assets/images/id_card/Asset 10@4x.png"), 103 | backgroundImage: NetworkImage( 104 | Devfest.prefs.getString(Devfest.photoPref)), 105 | ), 106 | ], 107 | ), 108 | Text( 109 | Devfest.prefs.getString(Devfest.displayNamePref), 110 | textAlign: TextAlign.center, 111 | style: TextStyle( 112 | fontSize: 36, 113 | ), 114 | ), 115 | Row( 116 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 117 | children: [ 118 | ConstrainedBox( 119 | constraints: BoxConstraints( 120 | maxWidth: MediaQuery.of(context).size.width / 4), 121 | child: 122 | Image.asset("assets/images/id_card/Asset 13@4x.png"), 123 | ), 124 | QrImage( 125 | backgroundColor: Colors.white, 126 | size: MediaQuery.of(context).size.width / 3, 127 | data: Devfest.prefs.getString(Devfest.uidPref), 128 | version: QrVersions.auto, 129 | ), 130 | ConstrainedBox( 131 | constraints: BoxConstraints( 132 | maxWidth: MediaQuery.of(context).size.width / 4), 133 | child: 134 | Image.asset("assets/images/id_card/Asset 14@4x.png"), 135 | ), 136 | ], 137 | ), 138 | Column( 139 | mainAxisAlignment: MainAxisAlignment.center, 140 | crossAxisAlignment: CrossAxisAlignment.center, 141 | children: [ 142 | Text("#GDGDevFest"), 143 | SizedBox( 144 | height: 5, 145 | ), 146 | Text("#DevFestGandinagar"), 147 | ], 148 | ), 149 | ], 150 | ), 151 | ], 152 | ), 153 | ), 154 | ); 155 | } 156 | } 157 | 158 | class BGCircle extends CustomPainter { 159 | double xCircle, yCircle, radius; 160 | BGCircle( 161 | {@required this.xCircle, @required this.yCircle, @required this.radius}); 162 | 163 | @override 164 | void paint(Canvas canvas, Size size) { 165 | Paint paint = new Paint(); 166 | paint.color = Colors.black; 167 | paint.style = PaintingStyle.fill; 168 | paint.strokeWidth = 1; 169 | 170 | canvas.drawCircle( 171 | Offset(xCircle, yCircle), 172 | radius, 173 | paint, 174 | ); 175 | } 176 | 177 | @override 178 | bool shouldRepaint(CustomPainter oldDelegate) { 179 | return false; 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /lib/signin/signin_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:devfest_gandhinagar/home/home_page.dart'; 3 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 4 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 8 | import 'package:google_sign_in/google_sign_in.dart'; 9 | 10 | class SignInPage extends StatelessWidget { 11 | final GoogleSignIn _googleSignIn = GoogleSignIn(); 12 | final FirebaseAuth _auth = FirebaseAuth.instance; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return StreamBuilder( 17 | stream: FirebaseAuth.instance.onAuthStateChanged, 18 | builder: (BuildContext context, snapshot) { 19 | if (snapshot.connectionState == ConnectionState.waiting || 20 | snapshot.connectionState == ConnectionState.none) { 21 | return SpinKitChasingDots( 22 | color: Colors.red, 23 | ); 24 | } else { 25 | if (snapshot.hasData) { 26 | return HomePage(); 27 | } 28 | return DevScaffold( 29 | title: "Sign In", 30 | body: Stack( 31 | children: [ 32 | Positioned( 33 | child: Image.asset("assets/images/doodles/Ellipse 101.png"), 34 | bottom: MediaQuery.of(context).size.height / 4.7, 35 | right: -1 * MediaQuery.of(context).size.width / 20, 36 | ), 37 | Positioned( 38 | child: Image.asset("assets/images/doodles/Ellipse 107.png"), 39 | right: MediaQuery.of(context).size.width / 12, 40 | top: MediaQuery.of(context).size.height / 3.3, 41 | ), 42 | Positioned( 43 | child: Image.asset("assets/images/doodles/Group 60.png"), 44 | left: -1 * MediaQuery.of(context).size.width / 40, 45 | top: MediaQuery.of(context).size.height / 3, 46 | ), 47 | Positioned( 48 | child: Image.asset("assets/images/doodles/Group 61.png"), 49 | top: MediaQuery.of(context).size.height / 30, 50 | right: MediaQuery.of(context).size.width / 1.12, 51 | ), 52 | Positioned( 53 | child: Image.asset("assets/images/doodles/Path 112.png"), 54 | left: MediaQuery.of(context).size.width / 1.1, 55 | ), 56 | Positioned( 57 | child: Image.asset("assets/images/doodles/Path 127.png"), 58 | top: MediaQuery.of(context).size.height / 1.7, 59 | right: MediaQuery.of(context).size.width / 1.09, 60 | ), 61 | Positioned( 62 | child: Image.asset("assets/images/doodles/Path 133.png"), 63 | top: MediaQuery.of(context).size.height / 1.28, 64 | left: MediaQuery.of(context).size.width / 1.2, 65 | ), 66 | Positioned( 67 | child: Image.asset("assets/images/doodles/Path 134.png"), 68 | top: MediaQuery.of(context).size.height / 1.28, 69 | right: MediaQuery.of(context).size.width / 1.25, 70 | ), 71 | Positioned( 72 | child: Image.asset("assets/images/doodles/Path 135.png"), 73 | bottom: MediaQuery.of(context).size.height / 1.24, 74 | left: MediaQuery.of(context).size.width / 2, 75 | ), 76 | Positioned( 77 | child: Image.asset("assets/images/doodles/Path 136.png"), 78 | top: MediaQuery.of(context).size.height / 1.25, 79 | left: MediaQuery.of(context).size.width / 2.5, 80 | ), 81 | Center( 82 | child: Column( 83 | mainAxisAlignment: MainAxisAlignment.start, 84 | children: [ 85 | SizedBox( 86 | height: MediaQuery.of(context).size.height / 10, 87 | ), 88 | Image.asset( 89 | Devfest.prefs.getBool(Devfest.darkModePref) ?? false 90 | ? "assets/images/devfest_logo_dark.png" 91 | : "assets/images/devfest_logo_light.png", 92 | scale: 1.15, 93 | ), 94 | SizedBox( 95 | height: MediaQuery.of(context).size.height / 10, 96 | ), 97 | Image.asset( 98 | "assets/images/google_logo.png", 99 | scale: 1.9, 100 | ), 101 | SizedBox( 102 | height: MediaQuery.of(context).size.height / 25, 103 | ), 104 | OutlineButton( 105 | borderSide: BorderSide( 106 | color: Devfest.prefs.getBool(Devfest.darkModePref) ?? 107 | false 108 | ? Colors.white 109 | : Colors.grey, 110 | ), 111 | highlightedBorderColor: Colors.transparent, 112 | highlightColor: Colors.green, 113 | highlightElevation: 5, 114 | shape: RoundedRectangleBorder( 115 | borderRadius: BorderRadius.all(Radius.circular(50)), 116 | // side: BorderSide( 117 | // color: Devfest.prefs.getBool(Devfest.darkModePref) 118 | // ? Colors.white 119 | // : Colors.grey, 120 | // ), 121 | ), 122 | child: Padding( 123 | padding: const EdgeInsets.symmetric( 124 | horizontal: 25, 125 | vertical: 6, 126 | ), 127 | child: Text( 128 | "Sign In", 129 | textScaleFactor: 1.4, 130 | style: TextStyle(), 131 | ), 132 | ), 133 | onPressed: () async { 134 | FirebaseUser user = await _handleGoogleSignIn(); 135 | setBasicData(user); 136 | }, 137 | ), 138 | ], 139 | ), 140 | ), 141 | ], 142 | ), 143 | ); 144 | } 145 | }, 146 | ); 147 | } 148 | 149 | Future _handleGoogleSignIn() async { 150 | final GoogleSignInAccount googleUser = await _googleSignIn.signIn(); 151 | final GoogleSignInAuthentication googleAuth = 152 | await googleUser.authentication; 153 | AuthCredential credential = GoogleAuthProvider.getCredential( 154 | accessToken: googleAuth.accessToken, 155 | idToken: googleAuth.idToken, 156 | ); 157 | AuthResult authResult = await _auth.signInWithCredential(credential); 158 | FirebaseUser user = authResult.user; 159 | return user; 160 | } 161 | 162 | void setBasicData(FirebaseUser user) async { 163 | Devfest.prefs.setString(Devfest.displayNamePref, user.displayName); 164 | Devfest.prefs.setString(Devfest.emailPref, user.email); 165 | Devfest.prefs.setString(Devfest.uidPref, user.uid); 166 | Devfest.prefs.setString(Devfest.photoPref, user.photoUrl); 167 | 168 | await Firestore.instance.collection('users').document(user.email).setData( 169 | { 170 | "display_name": user.displayName, 171 | "email": user.email, 172 | "uid": user.uid, 173 | "photo_url": user.photoUrl, 174 | }, 175 | ); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /lib/speakers/speaker_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:devfest_gandhinagar/dialogs/error_dialog.dart'; 6 | import 'package:devfest_gandhinagar/universal/profileAvatar.dart'; 7 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 8 | import 'package:flutter/cupertino.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:devfest_gandhinagar/home/speaker.dart'; 11 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 12 | import 'package:devfest_gandhinagar/utils/tools.dart'; 13 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 14 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 15 | import 'package:url_launcher/url_launcher.dart'; 16 | 17 | class SpeakerPage extends StatelessWidget { 18 | static const String routeName = "/speakers"; 19 | static List speakerList; 20 | 21 | Widget socialActions(context, Speaker speaker) => FittedBox( 22 | child: Row( 23 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 24 | children: [ 25 | IconButton( 26 | icon: Icon( 27 | FontAwesomeIcons.facebookF, 28 | size: 15, 29 | ), 30 | onPressed: () { 31 | launch(speaker.fbUrl); 32 | }, 33 | ), 34 | IconButton( 35 | icon: Icon( 36 | FontAwesomeIcons.twitter, 37 | size: 15, 38 | ), 39 | onPressed: () { 40 | launch(speaker.twitterUrl); 41 | }, 42 | ), 43 | IconButton( 44 | icon: Icon( 45 | FontAwesomeIcons.linkedinIn, 46 | size: 15, 47 | ), 48 | onPressed: () { 49 | launch(speaker.linkedinUrl); 50 | }, 51 | ), 52 | IconButton( 53 | icon: Icon( 54 | FontAwesomeIcons.github, 55 | size: 15, 56 | ), 57 | onPressed: () { 58 | launch(speaker.githubUrl); 59 | }, 60 | ), 61 | ], 62 | ), 63 | ); 64 | @override 65 | Widget build(BuildContext context) { 66 | // var _homeBloc = HomeBloc(); 67 | // var state = _homeBloc.currentState as InHomeState; 68 | speakerList = List(); 69 | return DevScaffold( 70 | title: "Speakers", 71 | body: FutureBuilder( 72 | future: 73 | Firestore.instance.collection("speakers").document("data").get(), 74 | builder: 75 | (BuildContext context, AsyncSnapshot snapshot) { 76 | if (snapshot.connectionState != ConnectionState.done) { 77 | return Container( 78 | color: Theme.of(context).scaffoldBackgroundColor, 79 | child: Center( 80 | child: SpinKitChasingDots( 81 | color: Tools.multiColors[Random().nextInt(3)], 82 | ), 83 | ), 84 | ); 85 | } else { 86 | if (snapshot.hasError) { 87 | return Center( 88 | child: ErrorDialog( 89 | error: snapshot.error, 90 | child: Text(Devfest.some_error_text), 91 | ), 92 | ); 93 | } else { 94 | for (int i = 0; i < snapshot.data.data["data"].length; i++) { 95 | if (Speaker.fromJson(Map.from( 96 | snapshot.data.data["data"][i])) 97 | .isVisible == 98 | true) 99 | speakerList.add(Speaker.fromJson(Map.from( 100 | snapshot.data.data["data"][i]))); 101 | } 102 | if (speakerList.length < 1) { 103 | return Center( 104 | child: Text(Devfest.comingSoonText), 105 | ); 106 | } 107 | 108 | speakerList.sort((a, b) { 109 | return a.speakerId.compareTo(b.speakerId); 110 | }); 111 | 112 | return ListView.builder( 113 | itemCount: speakerList.length, 114 | shrinkWrap: true, 115 | itemBuilder: (c, i) { 116 | return Card( 117 | elevation: 0.0, 118 | child: Padding( 119 | padding: const EdgeInsets.all(12.0), 120 | child: Row( 121 | mainAxisSize: MainAxisSize.min, 122 | children: [ 123 | ConstrainedBox( 124 | constraints: BoxConstraints.expand( 125 | height: MediaQuery.of(context).size.height * 0.15, 126 | width: MediaQuery.of(context).size.height * 0.15, 127 | ), 128 | child: CustomPaint( 129 | painter: ProfileAvatar(), 130 | child: Container( 131 | padding: EdgeInsets.all(3), 132 | decoration: BoxDecoration( 133 | shape: BoxShape.circle, 134 | color: Colors.yellow, 135 | ), 136 | child: CircleAvatar( 137 | radius: 55, 138 | backgroundImage: CachedNetworkImageProvider( 139 | speakerList[i].speakerImage, 140 | ), 141 | backgroundColor: Colors.white, 142 | ), 143 | ), 144 | ), 145 | ), 146 | SizedBox( 147 | width: 20, 148 | ), 149 | Expanded( 150 | child: Column( 151 | crossAxisAlignment: CrossAxisAlignment.start, 152 | mainAxisAlignment: MainAxisAlignment.start, 153 | mainAxisSize: MainAxisSize.min, 154 | children: [ 155 | Column( 156 | crossAxisAlignment: CrossAxisAlignment.start, 157 | mainAxisSize: MainAxisSize.min, 158 | children: [ 159 | Text( 160 | speakerList[i].speakerName, 161 | style: Theme.of(context).textTheme.title, 162 | ), 163 | SizedBox( 164 | height: 5, 165 | ), 166 | AnimatedContainer( 167 | duration: Duration(seconds: 1), 168 | width: MediaQuery.of(context).size.width * 169 | 0.2, 170 | height: 5, 171 | color: Tools 172 | .multiColors[Random().nextInt(4)], 173 | ), 174 | ], 175 | ), 176 | SizedBox( 177 | height: 10, 178 | ), 179 | socialActions(context, speakerList[i]), 180 | Text( 181 | speakerList[i].speakerDesc, 182 | style: Theme.of(context).textTheme.subtitle, 183 | ), 184 | SizedBox( 185 | height: 10, 186 | ), 187 | Text( 188 | speakerList[i].speakerSession, 189 | style: Theme.of(context).textTheme.caption, 190 | ), 191 | ], 192 | ), 193 | ) 194 | ], 195 | ), 196 | ), 197 | ); 198 | }, 199 | ); 200 | } 201 | } 202 | }, 203 | ), 204 | ); 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /lib/home/session.dart: -------------------------------------------------------------------------------- 1 | class Session { 2 | String sessionId; 3 | String sessionTitle; 4 | String sessionDesc; 5 | String sessionImage; 6 | String sessionStartTime; 7 | String sessionTotalTime; 8 | String sessionLink; 9 | String speakerName; 10 | String speakerDesc; 11 | String speakerImage; 12 | String speakerInfo; 13 | String speakerId; 14 | String track; 15 | 16 | Session({ 17 | this.sessionId, 18 | this.sessionTitle, 19 | this.sessionDesc, 20 | this.sessionImage, 21 | this.sessionStartTime, 22 | this.sessionTotalTime, 23 | this.sessionLink, 24 | this.speakerName, 25 | this.speakerDesc, 26 | this.speakerImage, 27 | this.speakerInfo, 28 | this.speakerId, 29 | this.track, 30 | }); 31 | 32 | Session.fromJson(Map json) { 33 | sessionId = json['session_id']; 34 | sessionTitle = json['speaker_session']; 35 | sessionDesc = json['session_desc']; 36 | sessionImage = json['session_image']; 37 | sessionStartTime = json['session_start_time']; 38 | sessionTotalTime = json['session_total_time']; 39 | sessionLink = json['session_link']; 40 | speakerName = json['speaker_name']; 41 | speakerDesc = json['speaker_desc']; 42 | speakerImage = json['speaker_image']; 43 | speakerInfo = json['speaker_info']; 44 | speakerId = json['speaker_id']; 45 | track = json['track']; 46 | } 47 | 48 | Map toJson() { 49 | final Map data = new Map(); 50 | data['session_id'] = this.sessionId; 51 | data['speaker_session'] = this.sessionTitle; 52 | data['session_desc'] = this.sessionDesc; 53 | data['session_image'] = this.sessionImage; 54 | data['session_start_time'] = this.sessionStartTime; 55 | data['session_total_time'] = this.sessionTotalTime; 56 | data['session_link'] = this.sessionLink; 57 | data['speaker_name'] = this.speakerName; 58 | data['speaker_desc'] = this.speakerDesc; 59 | data['speaker_image'] = this.speakerImage; 60 | data['speaker_info'] = this.speakerInfo; 61 | data['speaker_id'] = this.speakerId; 62 | data['track'] = this.track; 63 | return data; 64 | } 65 | } 66 | 67 | // //* Sessions hardcoded data 68 | // final desc = "The async/await feature allows you to write the asynchronous code in a straightforward way," + 69 | // "without a long list of callbacks. Used in C# for quite a while already, it has proven to be extremely useful.In Kotlin you have async and await as library functions implemented using coroutines." + 70 | // "A coroutine is a light-weight thread that can be suspended and resumed later." + 71 | // "Very precise definition, but might be confusing at first. What 'light-weight thread' means?" + 72 | // "How does suspension work? This talk uncovers the magic. We'll discuss the concept of coroutines," + 73 | // "the power of async/await, and how you can benefit from defining your asynchronous computations using suspend function." + 74 | // " The content of this video was not produced or created by Google."; 75 | 76 | // //* Tracks can be mobile, web and cloud (Make it web by default or if the track type is not clear.) 77 | 78 | // List sessions = [ 79 | // Session( 80 | // sessionId: "1", 81 | // sessionStartTime: "9:00 AM", 82 | // sessionTotalTime: "30 Mins", 83 | // sessionTitle: "DevByte: From Zero to ML on Google Cloud Platform", 84 | // sessionDesc: desc, 85 | // speakerImage: 86 | // "https://avatars1.githubusercontent.com/u/12619420?s=400&u=eac38b075e4e4463edfb0f0a8972825cf7803d4c&v=4", 87 | // speakerName: "Max Saltonstall", 88 | // speakerDesc: "Cloud Developer Advocate, Google DevByte speaker", 89 | // track: "cloud", 90 | // ), 91 | // Session( 92 | // sessionId: "2", 93 | // sessionStartTime: "9:30 AM", 94 | // sessionTotalTime: "30 Mins", 95 | // sessionTitle: "How I Became a Mobile Developer with Firebase and Flutter", 96 | // sessionDesc: desc, 97 | // speakerImage: 98 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/L2FwcGhvc3RpbmdfZ2xvYmFsL2Jsb2JzL0FFbkIyVW9DRktRcllTZDN1T2VINnhiUC11M2pVUFZFLVI0dVh5czF6d2lKNGRwanJjVjJhWm1zSUJZelVkZzBRaG9uRkNJZmhVZEg3ZGpVV0RhRmpQWXFYeHU0Y1ZDRmROb3FQYnVBQ2VKMWdOSFRHS3B0YWxRLk8xa3k2cVpFOG15UFAyRnk", 99 | // speakerName: "Laura Morinigo", 100 | // speakerDesc: "Software Developer, DMod Labs", 101 | // track: "mobile", 102 | // ), 103 | // Session( 104 | // sessionId: "3", 105 | // sessionStartTime: "10:30 AM", 106 | // sessionTotalTime: "30 Mins", 107 | // sessionTitle: "Angular Elements", 108 | // sessionDesc: desc, 109 | // speakerImage: 110 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/L2FwcGhvc3RpbmdfZ2xvYmFsL2Jsb2JzL0FFbkIyVXJET043VnFRT2R1UHdyS1lFUElwLVNaYlVVbnc1enJuNTNGbUtQQjR0SF9STVUzMVptdkgzclRpRjhTUDc2WUNvNldKNFVacFhiXzF4bUoxTVc0RzlfXzF3d2tPUXl4NTNSNjBNSzRoaXB1VVBxOTRFLk0yOHMwWm1NeURjaWxQZ1k", 111 | // speakerName: "Jimenez Raul", 112 | // speakerDesc: "Software Engineer, Byte Default", 113 | // track: "web", 114 | // ), 115 | // Session( 116 | // sessionId: "4", 117 | // sessionStartTime: "11:00 AM", 118 | // sessionTotalTime: "45 Mins", 119 | // sessionTitle: "Machine Learning and AutoML on GCP", 120 | // sessionDesc: desc, 121 | // speakerImage: 122 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/AEnB2UozlnKuWKqwaGjT2U6ylLLyMtoByOnx-ctrRmn5A8kptjCS50E8EgQDSuxYg8chsldOmSLbHScKX0ERlngHvbRp5XVRyNuAUSIm_Hguq3THTisLLaU.UyKUL3gyFQsEAcmO", 123 | // speakerName: "Sathish V J", 124 | // speakerDesc: "Tech Architect, Investor, Tutor", 125 | // track: "cloud", 126 | // ), 127 | // Session( 128 | // sessionId: "5", 129 | // sessionStartTime: "1:00 PM", 130 | // sessionTotalTime: "45 Mins", 131 | // sessionTitle: "Top 5 from Firebase Summit '18", 132 | // sessionDesc: desc, 133 | // speakerImage: 134 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/AEnB2UqZAYU9q0R5K2cq94DxU7ebiOMhilDlx5NzzsWWZ_oHxqcZV8H8j594rg_q_vyfTToA0BfScTHOHAj8uKf2OeF5MVqa_jmdjC9JO9-2TcPWjboxPf8.NN-XmkQxmHl1XyY_", 135 | // speakerName: "Timothy Jordan", 136 | // speakerDesc: "Sr. Staff Developer Advocate, Google", 137 | // track: "web", 138 | // ), 139 | // Session( 140 | // sessionId: "6", 141 | // sessionStartTime: "2:00 PM", 142 | // sessionTotalTime: "45 Mins", 143 | // sessionTitle: "Multiplayer Games with WebXR", 144 | // sessionDesc: desc, 145 | // speakerImage: 146 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/L2FwcGhvc3RpbmdfZ2xvYmFsL2Jsb2JzL0FFbkIyVXJ2Zkg0YUY1ZFJoMFFRbWlqdFE4MV9nNTdJR0dxUS1ubVJfbkN2Y1RaS3VoaUp2dWd3ejNmUmJRekFQaU5QNGhqd1F6cUtKQXpYeXJkemVyS2hUY1NzSWloMXFCNzQzdmpRVVVmU0Z4XzJZRDVZQXVBLnFHVllKVmc2MUVzQVZ5bVI", 147 | // speakerName: "Tanay Pant", 148 | // speakerDesc: "Web Developer Advocate, Mozilla Foundation", 149 | // track: "web", 150 | // ), 151 | // Session( 152 | // sessionId: "7", 153 | // sessionStartTime: "3:00 PM", 154 | // sessionTotalTime: "45 Mins", 155 | // sessionTitle: "Mobile Database Persistence", 156 | // sessionDesc: desc, 157 | // speakerImage: 158 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/AEnB2UqEG002BsGCqZLZRFUGu9xo4IpGamz6gTqlWxWyME0s-n8gR7Rs0tM5R6mPMOCRYf5rAunWx0GQeXDUHPag_XWGApdekw.cks8tPlPy-TeucOT", 159 | // speakerName: "Eric Maxwell", 160 | // speakerDesc: "Software Developer, Big Nerd Ranch", 161 | // track: "mobile", 162 | // ), 163 | // Session( 164 | // sessionId: "8", 165 | // sessionStartTime: "4:00 PM", 166 | // sessionTotalTime: "45 Mins", 167 | // sessionTitle: "Progressive Experience Web Development", 168 | // sessionDesc: desc, 169 | // speakerImage: 170 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/L2FwcGhvc3RpbmdfZ2xvYmFsL2Jsb2JzL0FFbkIyVXBET0RKT0JBV195UjVuSDRKS3JEenphN2gzLW80WEdvenlGdkZhNGREUzFmQUk1RjJnR0N5eEJIdlBkOVhlLUdwalVSWXlxbXJ4VFA0QXRZdnB4WDllWFNpdmdiNy14Q0tLOENCeU41Yks4NF9vUVQ0LlVFY0RBeld0ZTd4OEtSUTg", 171 | // speakerName: "Yohan Totting", 172 | // speakerDesc: "Web Developer Advocate, Google", 173 | // track: "web", 174 | // ), 175 | // Session( 176 | // sessionId: "9", 177 | // sessionStartTime: "5:00 PM", 178 | // sessionTotalTime: "45 Mins", 179 | // sessionTitle: "Kotlin Coroutines", 180 | // sessionDesc: desc, 181 | // speakerImage: 182 | // "https://devfest.withgoogle.com/api/assets?path=/gs/gweb-gc-gather-production.appspot.com/files/L2FwcGhvc3RpbmdfZ2xvYmFsL2Jsb2JzL0FFbkIyVW9XdVlxYUljN0RsYm1kejJaZFpkNENVMm1aTWhxU3VhNEtTVEoza3lBYVpDdGJsei1tSFB2ajNDc2FuZEdBbmNOMGlPZGtWRkJicHR6S1R0UVYxc1V2bXk0TWlBbnItWG00a3ZZc0laZ3VmVkg4NU5vLm1jNWdnX1pEZV8yT2FDalM", 183 | // speakerName: "Svetlana Isakova", 184 | // speakerDesc: "Developer Advocate, Jetbrain", 185 | // track: "mobile", 186 | // ), 187 | // ]; 188 | -------------------------------------------------------------------------------- /lib/team/team_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:devfest_gandhinagar/dialogs/error_dialog.dart'; 6 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:devfest_gandhinagar/home/team.dart'; 9 | import 'package:devfest_gandhinagar/universal/dev_scaffold.dart'; 10 | import 'package:devfest_gandhinagar/utils/tools.dart'; 11 | import 'package:devfest_gandhinagar/universal/profileAvatar.dart'; 12 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 13 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 14 | import 'package:url_launcher/url_launcher.dart'; 15 | 16 | class TeamPage extends StatelessWidget { 17 | static const String routeName = "/team"; 18 | static List fullTeamList; 19 | static List coreTeamList; 20 | static List teamList; 21 | 22 | Widget socialActions(context, Team team) => FittedBox( 23 | child: Row( 24 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 25 | children: [ 26 | IconButton( 27 | icon: Icon( 28 | FontAwesomeIcons.facebookF, 29 | size: 15, 30 | ), 31 | onPressed: () { 32 | launch(team.fbUrl); 33 | }, 34 | ), 35 | IconButton( 36 | icon: Icon( 37 | FontAwesomeIcons.twitter, 38 | size: 15, 39 | ), 40 | onPressed: () { 41 | launch(team.twitterUrl); 42 | }, 43 | ), 44 | IconButton( 45 | icon: Icon( 46 | FontAwesomeIcons.linkedinIn, 47 | size: 15, 48 | ), 49 | onPressed: () { 50 | launch(team.linkedinUrl); 51 | }, 52 | ), 53 | IconButton( 54 | icon: Icon( 55 | FontAwesomeIcons.github, 56 | size: 15, 57 | ), 58 | onPressed: () { 59 | launch(team.githubUrl); 60 | }, 61 | ), 62 | ], 63 | ), 64 | ); 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | fullTeamList = List(); 69 | coreTeamList = List(); 70 | teamList = List(); 71 | 72 | return DevScaffold( 73 | title: "Team", 74 | body: FutureBuilder( 75 | future: Firestore.instance.collection("team").document("data").get(), 76 | builder: 77 | (BuildContext context, AsyncSnapshot snapshot) { 78 | if (snapshot.connectionState == ConnectionState.none || 79 | snapshot.connectionState == ConnectionState.waiting) { 80 | return Container( 81 | color: Theme.of(context).scaffoldBackgroundColor, 82 | child: Center( 83 | child: SpinKitChasingDots( 84 | color: Tools.multiColors[Random().nextInt(3)], 85 | ), 86 | ), 87 | ); 88 | } else { 89 | if (snapshot.hasError) { 90 | return Center( 91 | child: ErrorDialog( 92 | error: snapshot.error, 93 | child: Text(Devfest.some_error_text), 94 | ), 95 | ); 96 | } else { 97 | for (int i = 0; i < snapshot.data.data["data"].length; i++) { 98 | // add core team members to the coreTeamList and others to teamList and 99 | //join the two to get sorted list with core teams at the top 100 | if (Team.fromJson(Map.from( 101 | snapshot.data.data["data"][i])) 102 | .isCore == 103 | true) { 104 | coreTeamList.add(Team.fromJson(Map.from( 105 | snapshot.data.data["data"][i]))); 106 | } else { 107 | teamList.add(Team.fromJson(Map.from( 108 | snapshot.data.data["data"][i]))); 109 | } 110 | } 111 | 112 | coreTeamList.sort((a, b) { 113 | return a.index.compareTo(b.index); 114 | }); 115 | 116 | teamList.sort((a, b) { 117 | return a.index.compareTo(b.index); 118 | }); 119 | 120 | fullTeamList = coreTeamList + teamList; 121 | 122 | if (fullTeamList.length < 1) { 123 | return Center( 124 | child: Text(Devfest.comingSoonText), 125 | ); 126 | } 127 | return ListView.builder( 128 | itemCount: fullTeamList.length, 129 | shrinkWrap: true, 130 | itemBuilder: (c, i) { 131 | return Card( 132 | elevation: 0.0, 133 | child: Padding( 134 | padding: const EdgeInsets.all(12.0), 135 | child: Row( 136 | mainAxisSize: MainAxisSize.min, 137 | children: [ 138 | ConstrainedBox( 139 | constraints: BoxConstraints.expand( 140 | height: MediaQuery.of(context).size.height * 0.15, 141 | width: MediaQuery.of(context).size.height * 0.15, 142 | ), 143 | child: CustomPaint( 144 | painter: ProfileAvatar(), 145 | child: Container( 146 | padding: EdgeInsets.all(3), 147 | decoration: BoxDecoration( 148 | shape: BoxShape.circle, 149 | color: Colors.yellow, 150 | ), 151 | child: CircleAvatar( 152 | radius: 55, 153 | backgroundImage: CachedNetworkImageProvider( 154 | fullTeamList[i].image, 155 | ), 156 | backgroundColor: Colors.white, 157 | ), 158 | ), 159 | ), 160 | ), 161 | SizedBox( 162 | width: 20, 163 | ), 164 | Expanded( 165 | child: Column( 166 | crossAxisAlignment: CrossAxisAlignment.start, 167 | mainAxisAlignment: MainAxisAlignment.start, 168 | mainAxisSize: MainAxisSize.min, 169 | children: [ 170 | Column( 171 | crossAxisAlignment: CrossAxisAlignment.start, 172 | mainAxisSize: MainAxisSize.min, 173 | children: [ 174 | Text( 175 | fullTeamList[i].name, 176 | style: Theme.of(context).textTheme.title, 177 | ), 178 | SizedBox( 179 | height: 5, 180 | ), 181 | AnimatedContainer( 182 | duration: Duration(seconds: 1), 183 | width: MediaQuery.of(context).size.width * 184 | 0.2, 185 | height: 5, 186 | color: Tools 187 | .multiColors[Random().nextInt(4)], 188 | ), 189 | SizedBox( 190 | height: 10, 191 | ), 192 | Text( 193 | fullTeamList[i].job, 194 | style: 195 | Theme.of(context).textTheme.subtitle, 196 | ), 197 | ], 198 | ), 199 | SizedBox( 200 | height: 10, 201 | ), 202 | socialActions(context, fullTeamList[i]), 203 | SizedBox( 204 | height: 10, 205 | ), 206 | Text( 207 | fullTeamList[i].team, 208 | style: Theme.of(context).textTheme.caption, 209 | ), 210 | ], 211 | ), 212 | ) 213 | ], 214 | ), 215 | ), 216 | ); 217 | }, 218 | ); 219 | } 220 | } 221 | }, 222 | ), 223 | ); 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /lib/home/home_widgets/home_front.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:devfest_gandhinagar/agenda/agenda_page.dart'; 4 | import 'package:devfest_gandhinagar/config/index.dart'; 5 | import 'package:devfest_gandhinagar/map/map_page.dart'; 6 | import 'package:devfest_gandhinagar/feedback/feedback_page.dart'; 7 | import 'package:devfest_gandhinagar/speakers/speaker_page.dart'; 8 | import 'package:devfest_gandhinagar/sponsors/sponsor_page.dart'; 9 | import 'package:devfest_gandhinagar/team/team_page.dart'; 10 | import 'package:devfest_gandhinagar/universal/image_card.dart'; 11 | import 'package:devfest_gandhinagar/utils/devfest.dart'; 12 | import 'package:devfest_gandhinagar/utils/tools.dart'; 13 | import 'package:flutter/scheduler.dart'; 14 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 15 | import 'package:url_launcher/url_launcher.dart'; 16 | 17 | class HomeFront extends StatefulWidget { 18 | @override 19 | _HomeFrontState createState() => _HomeFrontState(); 20 | } 21 | 22 | class _HomeFrontState extends State { 23 | @override 24 | void initState() { 25 | super.initState(); 26 | WidgetsBinding.instance.addPostFrameCallback((_) { 27 | // print("Widget Built"); 28 | if (Devfest.prefs.getBool(Devfest.isUpdatedPref ?? true)) { 29 | print( 30 | "Is App Updated: ${Devfest.prefs.getBool(Devfest.isUpdatedPref ?? true)}"); 31 | } else { 32 | print("App is not Updated"); 33 | showDialog( 34 | context: context, 35 | builder: (BuildContext context) { 36 | return AlertDialog( 37 | shape: RoundedRectangleBorder( 38 | borderRadius: BorderRadius.circular(20), 39 | ), 40 | title: Text("Update available"), 41 | content: Text( 42 | "We highly recommend using the version ${Devfest.prefs.getString(Devfest.recommendedVersionPref)} for the best experience.\nDownload now?"), 43 | actions: [ 44 | FlatButton( 45 | child: Text("OK"), 46 | onPressed: () { 47 | launch( 48 | "https://github.com/GDG-GANDHINAGAR/devfest-19-mobile/releases"); 49 | }, 50 | ), 51 | FlatButton( 52 | child: Text("Remind me later"), 53 | onPressed: () { 54 | Navigator.of(context).pop(); 55 | }, 56 | ), 57 | ], 58 | ); 59 | }, 60 | ); 61 | } 62 | }); 63 | } 64 | 65 | List devFestTexts(context) => [ 66 | Text( 67 | Devfest.welcomeText, 68 | style: Theme.of(context).textTheme.headline, 69 | textAlign: TextAlign.center, 70 | ), 71 | SizedBox( 72 | height: 10, 73 | ), 74 | Text( 75 | Devfest.descText, 76 | style: Theme.of(context).textTheme.caption, 77 | textAlign: TextAlign.center, 78 | ), 79 | ]; 80 | 81 | _launchURL(String url) async { 82 | if (await canLaunch(url)) { 83 | await launch(url); 84 | } else { 85 | throw 'Could not launch $url'; 86 | } 87 | } 88 | 89 | Widget newActionsFeedbackEnabled(context) => Wrap( 90 | alignment: WrapAlignment.center, 91 | spacing: 20.0, 92 | runSpacing: 20.0, 93 | children: [ 94 | ActionCard( 95 | icon: Icons.schedule, 96 | color: Colors.red, 97 | title: Devfest.agenda_text, 98 | onPressed: () => Navigator.pushNamed(context, AgendaPage.routeName), 99 | ), 100 | ActionCard( 101 | icon: Icons.person, 102 | color: Colors.green, 103 | title: Devfest.speakers_text, 104 | onPressed: () => 105 | Navigator.pushNamed(context, SpeakerPage.routeName), 106 | ), 107 | ActionCard( 108 | icon: Icons.people, 109 | color: Colors.amber, 110 | title: Devfest.team_text, 111 | onPressed: () => Navigator.pushNamed(context, TeamPage.routeName), 112 | ), 113 | ActionCard( 114 | icon: Icons.attach_money, 115 | color: Colors.purple, 116 | title: Devfest.sponsor_text, 117 | onPressed: () => 118 | Navigator.pushNamed(context, SponsorPage.routeName), 119 | ), 120 | ActionCard( 121 | icon: Icons.map, 122 | color: Colors.blue, 123 | title: Devfest.map_text, 124 | onPressed: () => Navigator.pushNamed(context, MapPage.routeName), 125 | ), 126 | ActionCard( 127 | icon: Icons.feedback, 128 | color: Colors.blue, 129 | title: Devfest.feedback_text, 130 | onPressed: () => 131 | Navigator.pushNamed(context, FeedbackPage.routeName), 132 | ), 133 | ], 134 | ); 135 | 136 | Widget newActionsFeedbackDisabled(context) => Wrap( 137 | alignment: WrapAlignment.center, 138 | spacing: 20.0, 139 | runSpacing: 20.0, 140 | children: [ 141 | ActionCard( 142 | icon: Icons.schedule, 143 | color: Colors.red, 144 | title: Devfest.agenda_text, 145 | onPressed: () => Navigator.pushNamed(context, AgendaPage.routeName), 146 | ), 147 | ActionCard( 148 | icon: Icons.person, 149 | color: Colors.green, 150 | title: Devfest.speakers_text, 151 | onPressed: () => 152 | Navigator.pushNamed(context, SpeakerPage.routeName), 153 | ), 154 | ActionCard( 155 | icon: Icons.people, 156 | color: Colors.amber, 157 | title: Devfest.team_text, 158 | onPressed: () => Navigator.pushNamed(context, TeamPage.routeName), 159 | ), 160 | ActionCard( 161 | icon: Icons.attach_money, 162 | color: Colors.purple, 163 | title: Devfest.sponsor_text, 164 | onPressed: () => 165 | Navigator.pushNamed(context, SponsorPage.routeName), 166 | ), 167 | ActionCard( 168 | icon: Icons.map, 169 | color: Colors.blue, 170 | title: Devfest.map_text, 171 | onPressed: () => Navigator.pushNamed(context, MapPage.routeName), 172 | ), 173 | ], 174 | ); 175 | 176 | Widget socialActions(context) => FittedBox( 177 | child: Row( 178 | mainAxisAlignment: MainAxisAlignment.spaceAround, 179 | children: [ 180 | IconButton( 181 | icon: Icon(FontAwesomeIcons.facebookF), 182 | onPressed: () async { 183 | await _launchURL("https://facebook.com/GDGGandhinagar"); 184 | }, 185 | ), 186 | IconButton( 187 | icon: Icon(FontAwesomeIcons.twitter), 188 | onPressed: () async { 189 | await _launchURL("https://twitter.com/GDG_Gandhinagar"); 190 | }, 191 | ), 192 | IconButton( 193 | icon: Icon(FontAwesomeIcons.meetup), 194 | onPressed: () async { 195 | await _launchURL("https://www.meetup.com/GDG-Gandhinagar/"); 196 | }, 197 | ), 198 | IconButton( 199 | icon: Icon(FontAwesomeIcons.slack), 200 | onPressed: () async { 201 | await _launchURL("http://gdg-gandhinagar.slack.com"); 202 | }, 203 | ), 204 | ], 205 | ), 206 | ); 207 | 208 | Widget homePage( 209 | {@required BuildContext context, @required bool feedbackVisible}) { 210 | // showUpdateDialog(context); 211 | return SingleChildScrollView( 212 | child: Padding( 213 | padding: const EdgeInsets.all(12.0), 214 | child: Column( 215 | crossAxisAlignment: CrossAxisAlignment.center, 216 | children: [ 217 | ImageCard( 218 | img: ConfigBloc().darkModeOn 219 | ? Devfest.banner_dark 220 | : Devfest.banner_light, 221 | ), 222 | SizedBox( 223 | height: 20, 224 | ), 225 | ...devFestTexts(context), 226 | SizedBox( 227 | height: 20, 228 | ), 229 | //control visibility of feedback form 230 | feedbackVisible 231 | ? newActionsFeedbackEnabled(context) 232 | : newActionsFeedbackDisabled(context), 233 | SizedBox( 234 | height: 20, 235 | ), 236 | socialActions(context), 237 | SizedBox( 238 | height: 20, 239 | ), 240 | Text( 241 | Devfest.app_version, 242 | style: Theme.of(context).textTheme.caption.copyWith(fontSize: 10), 243 | ) 244 | ], 245 | ), 246 | ), 247 | ); 248 | } 249 | 250 | @override 251 | Widget build(BuildContext context) { 252 | return StreamBuilder( 253 | stream: Firestore.instance 254 | .collection("homepage") 255 | .document("data") 256 | .snapshots(), 257 | builder: 258 | (BuildContext context, AsyncSnapshot snapshot) { 259 | if (snapshot.connectionState == ConnectionState.none || 260 | snapshot.connectionState == ConnectionState.waiting) { 261 | return homePage(context: context, feedbackVisible: false); 262 | } else { 263 | if (snapshot.hasError) { 264 | print("Error Occured:${snapshot.error}"); 265 | return homePage(context: context, feedbackVisible: false); 266 | } else { 267 | if (snapshot.data.data["meta"]["app_version_code"] == 268 | Devfest.app_version_code) { 269 | return homePage( 270 | context: context, 271 | feedbackVisible: snapshot.data.data["meta"]["feedback_active"], 272 | ); 273 | } else { 274 | return homePage( 275 | context: context, 276 | feedbackVisible: snapshot.data.data["meta"]["feedback_active"], 277 | ); 278 | } 279 | } 280 | } 281 | }, 282 | ); 283 | // return showDialog( 284 | // context: context, 285 | // barrierDismissible: false, 286 | // builder: (BuildContext context) { 287 | // return AlertDialog( 288 | // title: Text("Update Available"), 289 | // content: Text( 290 | // "A new version v${snapshot.data.data["meta"]["app_version_code"]} of the app is available. Download now?"), 291 | // actions: [ 292 | // FlatButton( 293 | // child: Text("OK"), 294 | // onPressed: () { 295 | // launch("https://devfest.gdggandhinagar.org"); 296 | // }, 297 | // ), 298 | // FlatButton( 299 | // onPressed: () { 300 | // Navigator.pop(context); 301 | // }, 302 | // child: Text("Cancel"), 303 | // ) 304 | // ], 305 | // ); 306 | // }, 307 | // ); 308 | // return SingleChildScrollView( 309 | // child: Padding( 310 | // padding: const EdgeInsets.all(12.0), 311 | // child: Column( 312 | // crossAxisAlignment: CrossAxisAlignment.center, 313 | // children: [ 314 | // ImageCard( 315 | // img: ConfigBloc().darkModeOn 316 | // ? Devfest.banner_dark 317 | // : Devfest.banner_light, 318 | // ), 319 | // SizedBox( 320 | // height: 20, 321 | // ), 322 | // ...devFestTexts(context), 323 | // SizedBox( 324 | // height: 20, 325 | // ), 326 | // //streambuilder controlled feedback button 327 | // StreamBuilder( 328 | // stream: Firestore.instance 329 | // .collection("homepage") 330 | // .document("data") 331 | // .snapshots(), 332 | // builder: (BuildContext context, 333 | // AsyncSnapshot snapshot) { 334 | // if (snapshot.connectionState == ConnectionState.none || 335 | // snapshot.connectionState == ConnectionState.waiting) { 336 | // return newActionsFeedbackDisabled(context); 337 | // } else { 338 | // if (snapshot.hasError) { 339 | // print("Has error ${snapshot.error}"); 340 | // return newActionsFeedbackDisabled(context); 341 | // } else { 342 | // if (snapshot.data.data["meta"]["feedback_active"] == true) { 343 | // return newActionsFeedbackEnabled(context); 344 | // } else { 345 | // return newActionsFeedbackDisabled(context); 346 | // } 347 | // } 348 | // } 349 | // }, 350 | // ), 351 | // SizedBox( 352 | // height: 20, 353 | // ), 354 | // socialActions(context), 355 | // SizedBox( 356 | // height: 20, 357 | // ), 358 | // Text( 359 | // Devfest.app_version, 360 | // style: Theme.of(context).textTheme.caption.copyWith(fontSize: 10), 361 | // ) 362 | // ], 363 | // ), 364 | // ), 365 | // ); 366 | } 367 | } 368 | 369 | class ActionCard extends StatelessWidget { 370 | final Function onPressed; 371 | final IconData icon; 372 | final String title; 373 | final Color color; 374 | 375 | const ActionCard({Key key, this.onPressed, this.icon, this.title, this.color}) 376 | : super(key: key); 377 | @override 378 | Widget build(BuildContext context) { 379 | return InkWell( 380 | borderRadius: BorderRadius.circular(10), 381 | onTap: onPressed, 382 | child: Ink( 383 | height: MediaQuery.of(context).size.height * 0.1, 384 | width: MediaQuery.of(context).size.width * 0.2, 385 | decoration: BoxDecoration( 386 | color: ConfigBloc().darkModeOn 387 | ? Tools.hexToColor("#1f2124") 388 | : Colors.white, 389 | borderRadius: BorderRadius.circular(8), 390 | boxShadow: !ConfigBloc().darkModeOn 391 | ? [ 392 | BoxShadow( 393 | color: Colors.grey[200], 394 | blurRadius: 10, 395 | spreadRadius: 5, 396 | ) 397 | ] 398 | : null, 399 | ), 400 | child: Column( 401 | mainAxisAlignment: MainAxisAlignment.center, 402 | children: [ 403 | Icon( 404 | icon, 405 | color: color, 406 | ), 407 | SizedBox( 408 | height: 10, 409 | ), 410 | Text( 411 | title, 412 | textAlign: TextAlign.center, 413 | style: Theme.of(context).textTheme.title.copyWith( 414 | fontSize: 12, 415 | ), 416 | ), 417 | ], 418 | ), 419 | ), 420 | ); 421 | } 422 | } 423 | --------------------------------------------------------------------------------