├── .flutter-plugins ├── .idea ├── encodings.xml ├── misc.xml └── runConfigurations │ └── main_dart.xml ├── .metadata ├── .packages ├── README.md ├── Screenshots ├── Blogs_1.jpg ├── Blogs_2.jpg ├── Blogs_3.jpg ├── buymecoffee.png ├── facebook.png ├── flutter-blogs.json ├── instagram.png ├── linkedin.png ├── stackoverflow.png └── twitter.png ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── io │ │ │ │ └── flutter │ │ │ │ └── plugins │ │ │ │ └── GeneratedPluginRegistrant.java │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── toastguyz │ │ │ │ └── flutter_blogs │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── 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 │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── assets ├── blog_placeholder.jpg ├── image_four.jpg ├── image_one.jpg ├── image_three.jpeg └── image_two.jpg ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Generated.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── GeneratedPluginRegistrant.h │ ├── GeneratedPluginRegistrant.m │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── main.dart ├── models │ └── model_blog.dart ├── screens │ ├── blog_create_screen.dart │ ├── blog_dashboard_indicator.dart │ ├── blog_detail_screen.dart │ └── blog_home_screen.dart └── utils │ ├── network_utils.dart │ └── theme_utils.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.flutter-plugins: -------------------------------------------------------------------------------- 1 | connectivity=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\connectivity-0.4.4\\ 2 | firebase_core=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_core-0.4.0+9\\ 3 | firebase_database=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_database-3.0.7\\ 4 | firebase_storage=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\firebase_storage-3.0.6\\ 5 | image_picker=D:\\Program_Files\\FlutterSDK\\flutter_windows_v1.9.1+hotfix.2-stable\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.6.1+4\\ 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 20e59316b8b8474554b38493b8ca888794b0234a 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /.packages: -------------------------------------------------------------------------------- 1 | # Generated by pub on 2019-09-29 23:22:40.880363. 2 | async:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.3.0/lib/ 3 | boolean_selector:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.5/lib/ 4 | charcode:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ 5 | collection:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/ 6 | connectivity:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.4/lib/ 7 | cupertino_icons:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.2/lib/ 8 | firebase_core:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/lib/ 9 | firebase_database:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_database-3.0.7/lib/ 10 | firebase_storage:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage-3.0.6/lib/ 11 | flutter:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/packages/flutter/lib/ 12 | flutter_test:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/packages/flutter_test/lib/ 13 | http:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+2/lib/ 14 | http_parser:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib/ 15 | image_picker:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.6.1+4/lib/ 16 | intl:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.0/lib/ 17 | matcher:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.5/lib/ 18 | meta:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.7/lib/ 19 | path:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/ 20 | pedantic:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/pedantic-1.8.0+1/lib/ 21 | quiver:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.5/lib/ 22 | sky_engine:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/bin/cache/pkg/sky_engine/lib/ 23 | source_span:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.5.5/lib/ 24 | stack_trace:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/ 25 | stream_channel:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/ 26 | string_scanner:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/ 27 | term_glyph:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/ 28 | test_api:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.5/lib/ 29 | typed_data:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/ 30 | vector_math:file:///D:/Program_Files/FlutterSDK/flutter_windows_v1.9.1+hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/ 31 | flutter_blogs:lib/ 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Blogs 2 | 3 | > A flutter application for managing and viewing blog posts with beautiful UI and great features. 4 | 5 | Main Features Used : 6 | - Beautiful UI Design 7 | - Firebase Authentication 8 | - Firebase Database 9 | - Image Picker 10 | - Form Validation 11 | - Pageview with Indicator 12 | 13 | ## Screenshots 14 | 15 | | 1 | 2| 16 | |------|-------| 17 | ||| 18 | 19 | | 3 | 20 | |------| 21 | || 22 | 23 | 24 | Don't forget to star :star2: the repo if you like our work.:heart::blue_heart::yellow_heart::purple_heart::green_heart: 25 | 26 | ## Website :link: 27 | 28 | > [Toastguyz](www.toastguyz.com) - A programming tutorials website 29 | 30 | ## Support on social media :thumbsup: 31 | 32 | >Follow us on our social media profiles to support us. 33 | 34 | - [Youtube Channel](https://www.youtube.com/toastguyz) 35 | - [Facebook Page](https://www.facebook.com/toastguyz) 36 | - [Twitter Account](https://www.twitter.com/toastguyz) 37 | - [Instagram Account](https://www.instagram.com/toastguyz) 38 | 39 | ## Code Developer 40 | 41 | >### Jay Patel :fire: 42 | >Enthusiastic Android & Flutter App Developer. 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ## ☕ Donate 51 | 52 | > [Paypal](https://www.paypal.me/toastguyz) 53 | 54 | 55 | ./Screenshots/buymecoffee.png 56 | 57 | 58 | Thanks for reaching out to us. :100: 59 | 60 | # Getting Started 61 | 62 | > 1. Create your flutter application project. 63 | > 2. [Set up with firebase](https://firebase.google.com/docs) 64 | > 3. Create Realtime Database with Test Rules and import the attached json file(flutter-blogs.json) in Screenshots folder to your flutter project. 65 | 66 | RealTime Database Rules : 67 | { 68 | "rules": { 69 | ".read": true, 70 | ".write": true 71 | } 72 | } 73 | 74 | Now, you're ready to rock the floor:guitar: -------------------------------------------------------------------------------- /Screenshots/Blogs_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/Blogs_1.jpg -------------------------------------------------------------------------------- /Screenshots/Blogs_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/Blogs_2.jpg -------------------------------------------------------------------------------- /Screenshots/Blogs_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/Blogs_3.jpg -------------------------------------------------------------------------------- /Screenshots/buymecoffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/buymecoffee.png -------------------------------------------------------------------------------- /Screenshots/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/facebook.png -------------------------------------------------------------------------------- /Screenshots/flutter-blogs.json: -------------------------------------------------------------------------------- 1 | { 2 | "BlogPosts" : { 3 | "-LpjGam_MSF6t0ya0ugB" : { 4 | "blogDescription" : "Blog Description 1\n\nLorem Ipsum Dummy Content. Lorem Ipsum Dummy Content. Lorem Ipsum Dummy Content. Lorem Ipsum Dummy Content.\n\nLorem Ipsum Dummy Content. Lorem Ipsum Dummy Content. Lorem Ipsum Dummy Content. Lorem Ipsum Dummy Content.\n\nLorem Ipsum Dummy Content. Lorem Ipsum Dummy Content. Lorem Ipsum Dummy Content. Lorem Ipsum Dummy Content.", 5 | "blogImage" : "", 6 | "blogTitle" : "Blog 1", 7 | "id" : "-LpjGam_MSF6t0ya0ugB", 8 | "updatedAt" : "2019-09-28T10:55:33.791414" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Screenshots/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/instagram.png -------------------------------------------------------------------------------- /Screenshots/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/linkedin.png -------------------------------------------------------------------------------- /Screenshots/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/stackoverflow.png -------------------------------------------------------------------------------- /Screenshots/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/Screenshots/twitter.png -------------------------------------------------------------------------------- /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 = '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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.toastguyz.flutter_blogs" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java: -------------------------------------------------------------------------------- 1 | package io.flutter.plugins; 2 | 3 | import io.flutter.plugin.common.PluginRegistry; 4 | import io.flutter.plugins.connectivity.ConnectivityPlugin; 5 | import io.flutter.plugins.firebase.core.FirebaseCorePlugin; 6 | import io.flutter.plugins.firebase.database.FirebaseDatabasePlugin; 7 | import io.flutter.plugins.firebase.storage.FirebaseStoragePlugin; 8 | import io.flutter.plugins.imagepicker.ImagePickerPlugin; 9 | 10 | /** 11 | * Generated file. Do not edit. 12 | */ 13 | public final class GeneratedPluginRegistrant { 14 | public static void registerWith(PluginRegistry registry) { 15 | if (alreadyRegisteredWith(registry)) { 16 | return; 17 | } 18 | ConnectivityPlugin.registerWith(registry.registrarFor("io.flutter.plugins.connectivity.ConnectivityPlugin")); 19 | FirebaseCorePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.core.FirebaseCorePlugin")); 20 | FirebaseDatabasePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.database.FirebaseDatabasePlugin")); 21 | FirebaseStoragePlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebase.storage.FirebaseStoragePlugin")); 22 | ImagePickerPlugin.registerWith(registry.registrarFor("io.flutter.plugins.imagepicker.ImagePickerPlugin")); 23 | } 24 | 25 | private static boolean alreadyRegisteredWith(PluginRegistry registry) { 26 | final String key = GeneratedPluginRegistrant.class.getCanonicalName(); 27 | if (registry.hasPlugin(key)) { 28 | return true; 29 | } 30 | registry.registrarFor(key); 31 | return false; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/toastguyz/flutter_blogs/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.toastguyz.flutter_blogs 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.31' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.3.0' 10 | classpath 'com.google.gms:google-services:4.2.0' 11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/blog_placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/assets/blog_placeholder.jpg -------------------------------------------------------------------------------- /assets/image_four.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/assets/image_four.jpg -------------------------------------------------------------------------------- /assets/image_one.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/assets/image_one.jpg -------------------------------------------------------------------------------- /assets/image_three.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/assets/image_three.jpeg -------------------------------------------------------------------------------- /assets/image_two.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/assets/image_two.jpg -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=D:\Program_Files\FlutterSDK\flutter_windows_v1.7.8+hotfix.4-stable\flutter 3 | FLUTTER_APPLICATION_PATH=G:\Flutter\GitProjects\flutter_blogs\flutter_blogs 4 | FLUTTER_TARGET=lib/main.dart 5 | FLUTTER_BUILD_DIR=build 6 | SYMROOT=${SOURCE_ROOT}/../build\ios 7 | FLUTTER_FRAMEWORK_DIR=D:\Program_Files\FlutterSDK\flutter_windows_v1.7.8+hotfix.4-stable\flutter\bin\cache\artifacts\engine\ios 8 | FLUTTER_BUILD_NAME=1.0.0 9 | FLUTTER_BUILD_NUMBER=1 10 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 9740EEB11CF90186004384FC /* Flutter */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3B80C3931E831B6300D905FE /* App.framework */, 73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 78 | ); 79 | name = Flutter; 80 | sourceTree = ""; 81 | }; 82 | 97C146E51CF9000F007C117D = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9740EEB11CF90186004384FC /* Flutter */, 86 | 97C146F01CF9000F007C117D /* Runner */, 87 | 97C146EF1CF9000F007C117D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 97C146EF1CF9000F007C117D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 97C146EE1CF9000F007C117D /* Runner.app */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 97C146F01CF9000F007C117D /* Runner */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 105 | 97C147021CF9000F007C117D /* Info.plist */, 106 | 97C146F11CF9000F007C117D /* Supporting Files */, 107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 111 | ); 112 | path = Runner; 113 | sourceTree = ""; 114 | }; 115 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 97C146ED1CF9000F007C117D /* Runner */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 128 | buildPhases = ( 129 | 9740EEB61CF901F6004384FC /* Run Script */, 130 | 97C146EA1CF9000F007C117D /* Sources */, 131 | 97C146EB1CF9000F007C117D /* Frameworks */, 132 | 97C146EC1CF9000F007C117D /* Resources */, 133 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = Runner; 141 | productName = Runner; 142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 97C146E61CF9000F007C117D /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 1020; 152 | ORGANIZATIONNAME = "The Chromium Authors"; 153 | TargetAttributes = { 154 | 97C146ED1CF9000F007C117D = { 155 | CreatedOnToolsVersion = 7.3.1; 156 | LastSwiftMigration = 0910; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = en; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 97C146E51CF9000F007C117D; 169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 97C146ED1CF9000F007C117D /* Runner */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 97C146EC1CF9000F007C117D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXShellScriptBuildPhase section */ 194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Thin Binary"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 207 | }; 208 | 9740EEB61CF901F6004384FC /* Run Script */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputPaths = ( 214 | ); 215 | name = "Run Script"; 216 | outputPaths = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | shellPath = /bin/sh; 220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 221 | }; 222 | /* End PBXShellScriptBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 97C146EA1CF9000F007C117D /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin PBXVariantGroup section */ 237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 97C146FB1CF9000F007C117D /* Base */, 241 | ); 242 | name = Main.storyboard; 243 | sourceTree = ""; 244 | }; 245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C147001CF9000F007C117D /* Base */, 249 | ); 250 | name = LaunchScreen.storyboard; 251 | sourceTree = ""; 252 | }; 253 | /* End PBXVariantGroup section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 257 | isa = XCBuildConfiguration; 258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 259 | buildSettings = { 260 | ALWAYS_SEARCH_USER_PATHS = NO; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_COMMA = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 272 | CLANG_WARN_EMPTY_BODY = YES; 273 | CLANG_WARN_ENUM_CONVERSION = YES; 274 | CLANG_WARN_INFINITE_RECURSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 278 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 281 | CLANG_WARN_STRICT_PROTOTYPES = YES; 282 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 283 | CLANG_WARN_UNREACHABLE_CODE = YES; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 286 | COPY_PHASE_STRIP = NO; 287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 288 | ENABLE_NS_ASSERTIONS = NO; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu99; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNUSED_FUNCTION = YES; 297 | GCC_WARN_UNUSED_VARIABLE = YES; 298 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 299 | MTL_ENABLE_DEBUG_INFO = NO; 300 | SDKROOT = iphoneos; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | VALIDATE_PRODUCT = YES; 303 | }; 304 | name = Profile; 305 | }; 306 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 307 | isa = XCBuildConfiguration; 308 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 312 | DEVELOPMENT_TEAM = S8QB4VV633; 313 | ENABLE_BITCODE = NO; 314 | FRAMEWORK_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "$(PROJECT_DIR)/Flutter", 317 | ); 318 | INFOPLIST_FILE = Runner/Info.plist; 319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 320 | LIBRARY_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "$(PROJECT_DIR)/Flutter", 323 | ); 324 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterBlogs; 325 | PRODUCT_NAME = "$(TARGET_NAME)"; 326 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 327 | SWIFT_VERSION = 4.0; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = dwarf; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | ENABLE_TESTABILITY = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_DYNAMIC_NO_PIC = NO; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_OPTIMIZATION_LEVEL = 0; 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 381 | MTL_ENABLE_DEBUG_INFO = YES; 382 | ONLY_ACTIVE_ARCH = YES; 383 | SDKROOT = iphoneos; 384 | TARGETED_DEVICE_FAMILY = "1,2"; 385 | }; 386 | name = Debug; 387 | }; 388 | 97C147041CF9000F007C117D /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_EMPTY_BODY = YES; 405 | CLANG_WARN_ENUM_CONVERSION = YES; 406 | CLANG_WARN_INFINITE_RECURSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 413 | CLANG_WARN_STRICT_PROTOTYPES = YES; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 420 | ENABLE_NS_ASSERTIONS = NO; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 431 | MTL_ENABLE_DEBUG_INFO = NO; 432 | SDKROOT = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterBlogs; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 462 | SWIFT_VERSION = 4.0; 463 | VERSIONING_SYSTEM = "apple-generic"; 464 | }; 465 | name = Debug; 466 | }; 467 | 97C147071CF9000F007C117D /* Release */ = { 468 | isa = XCBuildConfiguration; 469 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 470 | buildSettings = { 471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 472 | CLANG_ENABLE_MODULES = YES; 473 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 474 | ENABLE_BITCODE = NO; 475 | FRAMEWORK_SEARCH_PATHS = ( 476 | "$(inherited)", 477 | "$(PROJECT_DIR)/Flutter", 478 | ); 479 | INFOPLIST_FILE = Runner/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 481 | LIBRARY_SEARCH_PATHS = ( 482 | "$(inherited)", 483 | "$(PROJECT_DIR)/Flutter", 484 | ); 485 | PRODUCT_BUNDLE_IDENTIFIER = com.toastguyz.flutterBlogs; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 488 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 489 | SWIFT_VERSION = 4.0; 490 | VERSIONING_SYSTEM = "apple-generic"; 491 | }; 492 | name = Release; 493 | }; 494 | /* End XCBuildConfiguration section */ 495 | 496 | /* Begin XCConfigurationList section */ 497 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 498 | isa = XCConfigurationList; 499 | buildConfigurations = ( 500 | 97C147031CF9000F007C117D /* Debug */, 501 | 97C147041CF9000F007C117D /* Release */, 502 | 249021D3217E4FDB00AE95B9 /* Profile */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 508 | isa = XCConfigurationList; 509 | buildConfigurations = ( 510 | 97C147061CF9000F007C117D /* Debug */, 511 | 97C147071CF9000F007C117D /* Release */, 512 | 249021D4217E4FDB00AE95B9 /* Profile */, 513 | ); 514 | defaultConfigurationIsVisible = 0; 515 | defaultConfigurationName = Release; 516 | }; 517 | /* End XCConfigurationList section */ 518 | 519 | }; 520 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 521 | } 522 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toastguyz/flutter-blogs/32f400c066d2dad97892fb55a0d26401a03c6e68/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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/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/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #ifndef GeneratedPluginRegistrant_h 6 | #define GeneratedPluginRegistrant_h 7 | 8 | #import 9 | 10 | @interface GeneratedPluginRegistrant : NSObject 11 | + (void)registerWithRegistry:(NSObject*)registry; 12 | @end 13 | 14 | #endif /* GeneratedPluginRegistrant_h */ 15 | -------------------------------------------------------------------------------- /ios/Runner/GeneratedPluginRegistrant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | #import "GeneratedPluginRegistrant.h" 6 | #import 7 | #import 8 | #import 9 | #import 10 | #import 11 | 12 | @implementation GeneratedPluginRegistrant 13 | 14 | + (void)registerWithRegistry:(NSObject*)registry { 15 | [FLTConnectivityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTConnectivityPlugin"]]; 16 | [FLTFirebaseCorePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseCorePlugin"]]; 17 | [FLTFirebaseDatabasePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseDatabasePlugin"]]; 18 | [FLTFirebaseStoragePlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseStoragePlugin"]]; 19 | [FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_blogs 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_blogs/screens/blog_home_screen.dart'; 3 | 4 | void main() => runApp(MyApp()); 5 | 6 | class MyApp extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return MaterialApp( 10 | title: 'Flutter Blogs', 11 | debugShowCheckedModeBanner: false, 12 | theme: ThemeData( 13 | primarySwatch: Colors.blue, 14 | ), 15 | home: BlogHomeScreen(), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/models/model_blog.dart: -------------------------------------------------------------------------------- 1 | class ModelBlog { 2 | String id; 3 | String blogTitle; 4 | String blogImage; 5 | String blogDescription; 6 | String updatedAt; 7 | 8 | ModelBlog(this.id, this.blogTitle, this.blogImage, this.blogDescription, 9 | this.updatedAt); 10 | 11 | ModelBlog.fromJson(var value) { 12 | this.id = value["id"]; 13 | this.blogTitle = value["blogTitle"]; 14 | this.blogImage = value["blogImage"]; 15 | this.blogDescription = value["blogDescription"]; 16 | this.updatedAt = value["updatedAt"]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/screens/blog_create_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:firebase_database/firebase_database.dart'; 4 | import 'package:firebase_storage/firebase_storage.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_blogs/models/model_blog.dart'; 7 | import 'package:flutter_blogs/utils/network_utils.dart'; 8 | import 'package:flutter_blogs/utils/theme_utils.dart'; 9 | import 'package:image_picker/image_picker.dart'; 10 | 11 | class BlogCreateScreen extends StatefulWidget { 12 | final ModelBlog blog; 13 | 14 | BlogCreateScreen({this.blog}); 15 | 16 | @override 17 | _BlogCreateScreenState createState() => _BlogCreateScreenState(); 18 | } 19 | 20 | class _BlogCreateScreenState extends State { 21 | var _titleController = TextEditingController(); 22 | var _descriptionController = TextEditingController(); 23 | var _formKey = GlobalKey(); 24 | var isLoading = false; 25 | var isEditInitialised = true; 26 | 27 | File _imageFile; 28 | String filePath; 29 | Uri fileURI; 30 | 31 | _getImage(BuildContext context, ImageSource source) async { 32 | ImagePicker.pickImage( 33 | source: source, 34 | maxWidth: 400.0, 35 | maxHeight: 400.0, 36 | ).then((File image) async { 37 | if (image != null) { 38 | setState(() { 39 | _imageFile = image; 40 | filePath = image.path; 41 | fileURI = image.uri; 42 | }); 43 | } 44 | }); 45 | } 46 | 47 | Future uploadImage(File image) async { 48 | StorageReference firebaseStorageRef = FirebaseStorage.instance 49 | .ref() 50 | .child("images/${DateTime.now().toIso8601String()}"); 51 | 52 | StorageUploadTask uploadTask = firebaseStorageRef.putFile(image); 53 | 54 | StorageTaskSnapshot taskSnapshot = await uploadTask.onComplete; 55 | 56 | String storagePath = await taskSnapshot.ref.getDownloadURL(); 57 | print("storagePath : ${storagePath}"); 58 | 59 | Uri finalPath = Uri.parse(storagePath); 60 | print("finalPath : ${finalPath}"); 61 | 62 | return storagePath; 63 | } 64 | 65 | void _openImagePicker(BuildContext context) { 66 | showModalBottomSheet( 67 | context: context, 68 | builder: (BuildContext context) { 69 | return Container( 70 | height: 150.0, 71 | padding: EdgeInsets.all(20.0), 72 | child: Column( 73 | children: [ 74 | Center( 75 | child: Text( 76 | "Select Image", 77 | style: TextStyle( 78 | fontSize: 25.0, 79 | fontWeight: FontWeight.bold, 80 | color: themeColor, 81 | ), 82 | ), 83 | ), 84 | SizedBox( 85 | height: 10.0, 86 | ), 87 | GestureDetector( 88 | onTap: () { 89 | _getImage(context, ImageSource.camera); 90 | Navigator.of(context).pop(); 91 | }, 92 | child: Row( 93 | children: [ 94 | Icon( 95 | Icons.photo_camera, 96 | size: 30.0, 97 | color: themeColor, 98 | ), 99 | Padding( 100 | padding: EdgeInsets.symmetric( 101 | horizontal: 10.0, 102 | ), 103 | ), 104 | Text( 105 | "Use Camera", 106 | style: TextStyle( 107 | fontSize: 15.0, 108 | color: themeColor, 109 | ), 110 | ), 111 | ], 112 | ), 113 | ), 114 | SizedBox( 115 | height: 10.0, 116 | ), 117 | GestureDetector( 118 | onTap: () { 119 | _getImage(context, ImageSource.gallery); 120 | Navigator.of(context).pop(); 121 | }, 122 | child: Row( 123 | children: [ 124 | Icon( 125 | Icons.camera, 126 | size: 30.0, 127 | color: themeColor, 128 | ), 129 | Padding( 130 | padding: EdgeInsets.symmetric( 131 | horizontal: 10.0, 132 | ), 133 | ), 134 | Text( 135 | "Use Gallery", 136 | style: TextStyle( 137 | fontSize: 15.0, 138 | color: themeColor, 139 | ), 140 | ) 141 | ], 142 | ), 143 | ), 144 | ], 145 | ), 146 | ); 147 | }); 148 | } 149 | 150 | Widget _buildBlogImage() { 151 | return GestureDetector( 152 | onTap: () { 153 | _openImagePicker(context); 154 | }, 155 | child: Center( 156 | child: Stack( 157 | children: [ 158 | Container( 159 | width: MediaQuery.of(context).size.height * 0.3, 160 | height: MediaQuery.of(context).size.height * 0.3, 161 | decoration: BoxDecoration( 162 | /*image: DecorationImage( 163 | image: widget.blog!=null && widget.blog.blogImage != null 164 | ? AssetImage("assets/${widget.blog.blogImage}") 165 | : AssetImage('assets/blog_placeholder.jpg'), 166 | fit: BoxFit.cover, 167 | ),*/ 168 | 169 | image: DecorationImage( 170 | image: _imageFile != null 171 | ? FileImage(_imageFile) 172 | : widget.blog != null && 173 | widget.blog.blogImage != null && 174 | widget.blog.blogImage.length > 0 175 | ? NetworkImage( 176 | widget.blog.blogImage, 177 | ) 178 | : AssetImage('assets/blog_placeholder.jpg'), 179 | fit: BoxFit.cover, 180 | ), 181 | borderRadius: BorderRadius.circular( 182 | MediaQuery.of(context).size.height * 0.15, 183 | ), 184 | border: Border.all( 185 | color: Colors.white, 186 | width: 5.0, 187 | ), 188 | ), 189 | ), 190 | Positioned( 191 | bottom: MediaQuery.of(context).size.height * 0.045, 192 | right: MediaQuery.of(context).size.height * 0.045, 193 | child: Container( 194 | width: MediaQuery.of(context).size.height * 0.03, 195 | height: MediaQuery.of(context).size.height * 0.03, 196 | /*child: Icon(Icons.add_circle,color: Colors.red,),*/ 197 | child: Icon( 198 | Icons.camera_enhance, 199 | color: themeColor, 200 | size: 30.0, 201 | ), 202 | ), 203 | ), 204 | ], 205 | ), 206 | ), 207 | ); 208 | } 209 | 210 | @override 211 | Widget build(BuildContext context) { 212 | return Scaffold( 213 | backgroundColor: Colors.white, 214 | body: SafeArea( 215 | child: Column( 216 | children: [ 217 | Row( 218 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 219 | children: [ 220 | IconButton( 221 | icon: Icon( 222 | Icons.arrow_back, 223 | color: themeColor, 224 | ), 225 | onPressed: () { 226 | if (MediaQuery.of(context).viewInsets.bottom == 0) { 227 | // keyboard is not open 228 | Navigator.of(context).pop(); 229 | } else { 230 | // keyboard is open 231 | FocusScope.of(context).unfocus(); 232 | } 233 | }, 234 | ), 235 | IconButton( 236 | icon: Icon( 237 | Icons.done, 238 | color: themeColor, 239 | ), 240 | onPressed: () { 241 | _submitBlogPost(); 242 | }, 243 | ), 244 | ], 245 | ), 246 | SizedBox( 247 | height: MediaQuery.of(context).size.height * 0.01, 248 | ), 249 | Expanded( 250 | child: Center( 251 | child: isLoading 252 | ? CircularProgressIndicator() 253 | : SingleChildScrollView( 254 | child: Form( 255 | key: _formKey, 256 | child: Column( 257 | children: [ 258 | _buildBlogImage(), 259 | SizedBox( 260 | height: 261 | MediaQuery.of(context).size.height * 0.01, 262 | ), 263 | Padding( 264 | padding: EdgeInsets.only( 265 | left: 10.0, 266 | right: 10.0, 267 | top: 10.0, 268 | bottom: 10.0), 269 | child: TextFormField( 270 | controller: _titleController, 271 | decoration: InputDecoration( 272 | border: OutlineInputBorder( 273 | borderRadius: BorderRadius.circular(10.0), 274 | borderSide: BorderSide( 275 | width: 0, 276 | style: BorderStyle.none, 277 | ), 278 | ), 279 | hintText: "Blog Title", 280 | filled: true, 281 | fillColor: Colors.grey[100], 282 | ), 283 | style: TextStyle(color: themeColor), 284 | keyboardType: TextInputType.text, 285 | validator: (String title) { 286 | if (title.isEmpty || title.length < 6) { 287 | return 'valid blog title is required!!'; 288 | } 289 | }, 290 | ), 291 | ), 292 | Padding( 293 | padding: EdgeInsets.only( 294 | left: 10.0, 295 | right: 10.0, 296 | top: 10.0, 297 | bottom: 10.0), 298 | child: TextFormField( 299 | minLines: 10, 300 | maxLines: 10, 301 | controller: _descriptionController, 302 | decoration: InputDecoration( 303 | border: OutlineInputBorder( 304 | borderRadius: BorderRadius.circular(10.0), 305 | borderSide: BorderSide( 306 | width: 0, 307 | style: BorderStyle.none, 308 | ), 309 | ), 310 | hintText: "Blog Description", 311 | filled: true, 312 | fillColor: Colors.grey[100], 313 | ), 314 | style: TextStyle(color: themeColor), 315 | keyboardType: TextInputType.text, 316 | textInputAction: TextInputAction.newline, 317 | validator: (String description) { 318 | if (description.isEmpty || 319 | description.length < 10) { 320 | return 'valid blog description is required!!'; 321 | } 322 | }, 323 | ), 324 | ), 325 | ], 326 | ), 327 | ), 328 | ), 329 | ), 330 | ), 331 | ], 332 | ), 333 | ), 334 | ); 335 | } 336 | 337 | _submitBlogPost() async { 338 | if (!_formKey.currentState.validate()) { 339 | return; 340 | } 341 | 342 | NetworkCheck networkCheck = NetworkCheck(); 343 | networkCheck.checkInternet((isNetworkPresent) async { 344 | if (!isNetworkPresent) { 345 | final snackBar = 346 | SnackBar(content: Text("Please check your internet connection !!")); 347 | 348 | Scaffold.of(context).showSnackBar(snackBar); 349 | return; 350 | } else { 351 | setState(() { 352 | isLoading = true; 353 | }); 354 | } 355 | }); 356 | 357 | try { 358 | var imageUrl; 359 | try { 360 | if (_imageFile != null) { 361 | imageUrl = await uploadImage(_imageFile); 362 | } 363 | } catch (error) { 364 | print(error.toString()); 365 | } 366 | 367 | final blogTaskReference = 368 | FirebaseDatabase.instance.reference().child("BlogPosts"); 369 | 370 | String resourceID = blogTaskReference.push().key; 371 | if (widget.blog == null || widget.blog.id == null) { 372 | await blogTaskReference.child(resourceID).set({ 373 | "id": resourceID, 374 | "blogTitle": _titleController.text, 375 | "blogImage": imageUrl != null && imageUrl.length > 0 ? imageUrl : "", 376 | "blogDescription": _descriptionController.text, 377 | "updatedAt": DateTime.now().toIso8601String(), 378 | }); 379 | } else { 380 | await blogTaskReference.child(widget.blog.id).update({ 381 | "id": widget.blog.id, 382 | "blogTitle": _titleController.text, 383 | "blogImage": imageUrl != null && imageUrl.length > 0 384 | ? imageUrl 385 | : widget.blog.blogImage, 386 | "blogDescription": _descriptionController.text, 387 | "updatedAt": DateTime.now().toIso8601String(), 388 | }); 389 | } 390 | 391 | setState(() { 392 | isLoading = false; 393 | }); 394 | 395 | Navigator.of(context).pop(); 396 | } catch (error) { 397 | print("catch block : " + error.toString()); 398 | 399 | setState(() { 400 | isLoading = false; 401 | }); 402 | 403 | final snackBar = 404 | SnackBar(content: Text("Something went wrong. please try again !!")); 405 | 406 | Scaffold.of(context).showSnackBar(snackBar); 407 | } 408 | } 409 | 410 | @override 411 | void didChangeDependencies() { 412 | if (widget.blog != null) { 413 | if (isEditInitialised) { 414 | _titleController.text = widget.blog.blogTitle; 415 | _descriptionController.text = widget.blog.blogDescription; 416 | isEditInitialised = false; 417 | } 418 | } 419 | 420 | super.didChangeDependencies(); 421 | } 422 | } 423 | -------------------------------------------------------------------------------- /lib/screens/blog_dashboard_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class BlogDashboardIndicator extends AnimatedWidget { 5 | BlogDashboardIndicator({ 6 | this.controller, 7 | this.itemCount, 8 | this.onPageSelected, 9 | this.color: Colors.white, 10 | }) : super(listenable: controller); 11 | 12 | /// The PageController that this DotsIndicator is representing. 13 | final PageController controller; 14 | 15 | /// The number of items managed by the PageController 16 | final int itemCount; 17 | 18 | /// Called when a dot is tapped 19 | final ValueChanged onPageSelected; 20 | 21 | /// The color of the dots. 22 | /// Defaults to `Colors.white`. 23 | final Color color; 24 | 25 | // The base size of the dots 26 | static const double _kDotSize = 8.0; 27 | 28 | // The increase in the size of the selected dot 29 | static const double _kMaxZoom = 2.0; 30 | 31 | // The distance between the center of each dot 32 | static const double _kDotSpacing = 25.0; 33 | 34 | Widget _buildDot(int index) { 35 | double selectedness = Curves.easeOut.transform( 36 | max( 37 | 0.0, 38 | 1.0 - ((controller.page ?? controller.initialPage) - index).abs(), 39 | ), 40 | ); 41 | double zoom = 1.0 + (_kMaxZoom - 1.0) * selectedness; 42 | return Container( 43 | width: _kDotSpacing, 44 | child: Center( 45 | child: Material( 46 | color: color, 47 | type: MaterialType.card, 48 | child: Container( 49 | width: _kDotSize * zoom, 50 | height: _kDotSize * zoom, 51 | child: InkWell( 52 | onTap: () => onPageSelected(index), 53 | ), 54 | ), 55 | ), 56 | ), 57 | ); 58 | } 59 | 60 | Widget build(BuildContext context) { 61 | return Row( 62 | mainAxisAlignment: MainAxisAlignment.center, 63 | children: List.generate(itemCount, _buildDot), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/screens/blog_detail_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_blogs/models/model_blog.dart'; 3 | import 'package:flutter_blogs/screens/blog_create_screen.dart'; 4 | import 'package:flutter_blogs/utils/theme_utils.dart'; 5 | 6 | class BlogDetailScreen extends StatefulWidget { 7 | final ModelBlog blog; 8 | 9 | BlogDetailScreen(this.blog); 10 | 11 | @override 12 | _BlogDetailScreenState createState() => _BlogDetailScreenState(); 13 | } 14 | 15 | class _BlogDetailScreenState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | body: CustomScrollView( 20 | slivers: [ 21 | SliverAppBar( 22 | backgroundColor: themeColor, 23 | pinned: true, 24 | titleSpacing: 0.0, 25 | expandedHeight: MediaQuery.of(context).size.height * 0.3, 26 | flexibleSpace: FlexibleSpaceBar( 27 | centerTitle: true, 28 | // titlePadding: EdgeInsets.only(left:40.0,top: 10.0,bottom: 10.0), 29 | title: Text( 30 | widget.blog.blogTitle, 31 | textAlign: TextAlign.center, 32 | ), 33 | background: Hero( 34 | tag: widget.blog.id, 35 | child: widget.blog.blogImage != null && 36 | widget.blog.blogImage.length > 0 37 | ? Image.network( 38 | widget.blog.blogImage, 39 | fit: BoxFit.cover, 40 | ) 41 | : Image.asset( 42 | 'assets/blog_placeholder.jpg', 43 | fit: BoxFit.cover, 44 | ), 45 | ), 46 | ), 47 | actions: [ 48 | IconButton( 49 | icon: Icon( 50 | Icons.edit, 51 | color: Colors.white, 52 | ), 53 | onPressed: () { 54 | Navigator.push( 55 | context, 56 | MaterialPageRoute( 57 | builder: (context) => BlogCreateScreen( 58 | blog: widget.blog, 59 | ), 60 | ), 61 | ); 62 | }, 63 | ), 64 | ], 65 | ), 66 | SliverList( 67 | delegate: SliverChildListDelegate([ 68 | SizedBox( 69 | height: 10.0, 70 | ), 71 | Container( 72 | padding: EdgeInsets.symmetric(horizontal: 10.0), 73 | width: double.infinity, 74 | child: Text( 75 | widget.blog.blogDescription, 76 | textAlign: TextAlign.center, 77 | softWrap: true, 78 | style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.w400), 79 | ), 80 | ), 81 | SizedBox( 82 | height: 1000.0, 83 | ), 84 | ]), 85 | ), 86 | ], 87 | ), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/screens/blog_home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_database/firebase_database.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_blogs/models/model_blog.dart'; 4 | import 'package:flutter_blogs/screens/blog_create_screen.dart'; 5 | import 'package:flutter_blogs/screens/blog_dashboard_indicator.dart'; 6 | import 'package:flutter_blogs/screens/blog_detail_screen.dart'; 7 | import 'package:flutter_blogs/utils/network_utils.dart'; 8 | import 'package:flutter_blogs/utils/theme_utils.dart'; 9 | import 'package:intl/intl.dart'; 10 | 11 | class BlogHomeScreen extends StatefulWidget { 12 | @override 13 | _BlogHomeScreenState createState() => _BlogHomeScreenState(); 14 | } 15 | 16 | class _BlogHomeScreenState extends State 17 | with SingleTickerProviderStateMixin { 18 | bool isCollapsed = true; 19 | double screenWidth, screenHeight; 20 | final Duration duration = const Duration(milliseconds: 300); 21 | var _pageController = PageController(viewportFraction: 1.0); 22 | var images = [ 23 | "image_one.jpg", 24 | "image_two.jpg", 25 | "image_three.jpeg", 26 | "image_four.jpg" 27 | ]; 28 | bool isLoading = false; 29 | List blogList = []; 30 | 31 | // var dateFormat = DateFormat("dd-MM-yyyy hh:mm:ss a"); 32 | var dateFormat = DateFormat("dd MMM, yyyy"); 33 | 34 | @override 35 | void initState() { 36 | super.initState(); 37 | 38 | fetchBlogList(); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return Scaffold( 44 | backgroundColor: Colors.grey[200], 45 | appBar: AppBar( 46 | backgroundColor: Colors.white, 47 | leading: Icon( 48 | Icons.menu, 49 | color: themeColor, 50 | ), 51 | primary: true, 52 | centerTitle: true, 53 | title: Text("Dashboard", style: TextStyle(color: themeColor)), 54 | actions: [ 55 | IconButton( 56 | icon: Icon(Icons.share, color: themeColor), 57 | onPressed: () {}, 58 | ) 59 | ], 60 | ), 61 | body: isLoading 62 | ? Center( 63 | child: CircularProgressIndicator(), 64 | ) 65 | : blogList == null || blogList.length == 0 66 | ? Center( 67 | child: Text( 68 | "No Blogs Found!!", 69 | style: TextStyle( 70 | color: themeColor, 71 | fontWeight: FontWeight.w500, 72 | fontSize: 25.0), 73 | ), 74 | ) 75 | : SingleChildScrollView( 76 | child: Column( 77 | mainAxisSize: MainAxisSize.min, 78 | mainAxisAlignment: MainAxisAlignment.start, 79 | children: [ 80 | SizedBox(height: 10), 81 | Stack( 82 | children: [ 83 | dashboard(context), 84 | ], 85 | ), 86 | Container( 87 | height: 20.0, 88 | child: Center( 89 | child: BlogDashboardIndicator( 90 | controller: _pageController, 91 | itemCount: images.length, 92 | color: themeColor, 93 | onPageSelected: (int page) { 94 | _pageController.animateToPage(page, 95 | duration: Duration(milliseconds: 300), 96 | curve: Curves.ease); 97 | }, 98 | ), 99 | ), 100 | ), 101 | SizedBox(height: 10), 102 | Container( 103 | color: Colors.white, 104 | alignment: Alignment.center, 105 | padding: const EdgeInsets.symmetric(horizontal: 15.0), 106 | child: Row( 107 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 108 | children: [ 109 | Text( 110 | "Blogs", 111 | style: TextStyle( 112 | fontSize: 20.0, 113 | fontWeight: FontWeight.w600, 114 | color: themeColor), 115 | ), 116 | IconButton( 117 | icon: Icon( 118 | Icons.favorite_border, 119 | size: 25.0, 120 | color: themeColor, 121 | ), 122 | onPressed: () {}, 123 | ) 124 | ], 125 | ), 126 | ), 127 | Container( 128 | color: Colors.grey[200], 129 | child: ListView.builder( 130 | shrinkWrap: true, 131 | physics: NeverScrollableScrollPhysics(), 132 | itemCount: blogList.length, 133 | itemBuilder: (BuildContext context, int index) { 134 | var blogDateTime = 135 | DateTime.parse(blogList[index].updatedAt); 136 | final blogDate = dateFormat.format(blogDateTime); 137 | 138 | return Hero( 139 | tag: blogList[index].id, 140 | child: Card( 141 | margin: index != (blogList.length - 1) 142 | ? EdgeInsets.only( 143 | top: 10.0, 144 | left: 10.0, 145 | right: 10.0, 146 | bottom: 0.0) 147 | : EdgeInsets.only( 148 | top: 10.0, 149 | left: 10.0, 150 | right: 10.0, 151 | bottom: 10.0), 152 | color: themeColor, 153 | child: ListTile( 154 | onTap: () { 155 | Navigator.push( 156 | context, 157 | MaterialPageRoute( 158 | builder: (context) => 159 | BlogDetailScreen( 160 | blogList[index])), 161 | ); 162 | }, 163 | title: Text( 164 | blogList[index].blogTitle, 165 | overflow: TextOverflow.ellipsis, 166 | style: TextStyle( 167 | fontSize: 20.0, 168 | fontWeight: FontWeight.bold, 169 | color: Colors.white), 170 | ), 171 | subtitle: Text( 172 | blogList[index].blogDescription, 173 | style: TextStyle( 174 | fontSize: 15.0, color: Colors.white), 175 | overflow: TextOverflow.ellipsis, 176 | ), 177 | leading: CircleAvatar( 178 | child: CircleAvatar( 179 | backgroundImage: blogList[index] != null && blogList[index].blogImage != null && blogList[index].blogImage.length>0 180 | ? NetworkImage(blogList[index].blogImage) 181 | : AssetImage("assets/blog_placeholder.jpg"), 182 | ), 183 | ), 184 | trailing: Text( 185 | blogDate, 186 | style: TextStyle( 187 | fontSize: 15.0, 188 | fontWeight: FontWeight.w500, 189 | color: Colors.white), 190 | ), 191 | ), 192 | ), 193 | ); 194 | }, 195 | ), 196 | ), 197 | ], 198 | ), 199 | ), 200 | floatingActionButton: FloatingActionButton( 201 | backgroundColor: Colors.red, 202 | onPressed: () { 203 | // _createBlogPost(); 204 | Navigator.push(context, 205 | MaterialPageRoute(builder: (context) => BlogCreateScreen())); 206 | }, 207 | child: Icon(Icons.add), 208 | ), 209 | ); 210 | } 211 | 212 | fetchBlogList() async { 213 | NetworkCheck networkCheck = NetworkCheck(); 214 | networkCheck.checkInternet((isNetworkPresent) async { 215 | if (!isNetworkPresent) { 216 | final snackBar = 217 | SnackBar(content: Text("Please check your internet connection !!")); 218 | 219 | Scaffold.of(context).showSnackBar(snackBar); 220 | return; 221 | } else { 222 | setState(() { 223 | isLoading = true; 224 | }); 225 | } 226 | }); 227 | 228 | try { 229 | final blogTaskReference = 230 | FirebaseDatabase.instance.reference().child("BlogPosts"); 231 | 232 | blogTaskReference.onValue.listen((Event event) { 233 | blogList = []; 234 | if (event.snapshot.value != null) { 235 | for (var value in event.snapshot.value.values) { 236 | blogList.add(ModelBlog.fromJson(value)); 237 | } 238 | } 239 | 240 | /*for (int i = 0; i < blogList.length; i++) { 241 | print(blogList[i].id); 242 | print(blogList[i].blogTitle); 243 | print(blogList[i].blogImage); 244 | print(blogList[i].blogDescription); 245 | print(blogList[i].updatedAt); 246 | }*/ 247 | 248 | setState(() { 249 | isLoading = false; 250 | }); 251 | }); 252 | 253 | // Method-1 254 | /*blogTaskReference.once().then((DataSnapshot snapshot) { 255 | Map values = snapshot.value; 256 | values.forEach((key, values) { 257 | print(key); 258 | print(values); 259 | print('---------'); 260 | }); 261 | });*/ 262 | 263 | // Method-2 264 | /*blogTaskReference.orderByKey().onValue.listen((blog) { 265 | for (var value in blog.snapshot.value.values) { 266 | print("Key ${value}"); 267 | print('---------'); 268 | } 269 | });*/ 270 | } catch (error) { 271 | print("catch block : " + error.toString()); 272 | 273 | setState(() { 274 | isLoading = false; 275 | }); 276 | } 277 | } 278 | 279 | Widget dashboard(context) { 280 | return Container( 281 | // height: 200, 282 | height: MediaQuery.of(context).size.height * 0.3, 283 | child: PageView.builder( 284 | physics: AlwaysScrollableScrollPhysics(), 285 | itemCount: images.length, 286 | controller: _pageController, 287 | scrollDirection: Axis.horizontal, 288 | pageSnapping: true, 289 | itemBuilder: (BuildContext context, int index) { 290 | return getPageContent(index); 291 | }, 292 | ), 293 | ); 294 | } 295 | 296 | Widget getPageContent(index) { 297 | return Card( 298 | elevation: 5.0, 299 | margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 10.0, bottom: 10.0), 300 | borderOnForeground: true, 301 | clipBehavior: Clip.antiAliasWithSaveLayer, 302 | child: Image.asset( 303 | "assets/${images[index]}", 304 | fit: BoxFit.cover, 305 | ), 306 | // color: backgroundColor, 307 | ); 308 | } 309 | } 310 | -------------------------------------------------------------------------------- /lib/utils/network_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectivity/connectivity.dart'; 2 | 3 | class NetworkCheck { 4 | Future check() async { 5 | var connectivityResult = await (Connectivity().checkConnectivity()); 6 | if (connectivityResult == ConnectivityResult.mobile) { 7 | return true; 8 | } else if (connectivityResult == ConnectivityResult.wifi) { 9 | return true; 10 | } 11 | return false; 12 | } 13 | 14 | dynamic checkInternet(Function func) { 15 | check().then((intenet) { 16 | if (intenet != null && intenet) { 17 | func(true); 18 | } 19 | else{ 20 | func(false); 21 | } 22 | }); 23 | } 24 | } -------------------------------------------------------------------------------- /lib/utils/theme_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | final Color themeColor = Color(0xF5404B60); -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.3.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.5" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.11" 32 | connectivity: 33 | dependency: "direct main" 34 | description: 35 | name: connectivity 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.4.4" 39 | cupertino_icons: 40 | dependency: "direct main" 41 | description: 42 | name: cupertino_icons 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.1.2" 46 | firebase_core: 47 | dependency: transitive 48 | description: 49 | name: firebase_core 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.4.0+9" 53 | firebase_database: 54 | dependency: "direct main" 55 | description: 56 | name: firebase_database 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "3.0.7" 60 | firebase_storage: 61 | dependency: "direct main" 62 | description: 63 | name: firebase_storage 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "3.0.6" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | http: 78 | dependency: "direct main" 79 | description: 80 | name: http 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.12.0+2" 84 | http_parser: 85 | dependency: transitive 86 | description: 87 | name: http_parser 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "3.1.3" 91 | image_picker: 92 | dependency: "direct main" 93 | description: 94 | name: image_picker 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.6.1+4" 98 | intl: 99 | dependency: "direct main" 100 | description: 101 | name: intl 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.16.0" 105 | matcher: 106 | dependency: transitive 107 | description: 108 | name: matcher 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "0.12.5" 112 | meta: 113 | dependency: transitive 114 | description: 115 | name: meta 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.1.7" 119 | path: 120 | dependency: transitive 121 | description: 122 | name: path 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.6.4" 126 | pedantic: 127 | dependency: transitive 128 | description: 129 | name: pedantic 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.8.0+1" 133 | quiver: 134 | dependency: transitive 135 | description: 136 | name: quiver 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "2.0.5" 140 | sky_engine: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.99" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.5.5" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.9.3" 159 | stream_channel: 160 | dependency: transitive 161 | description: 162 | name: stream_channel 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.0.0" 166 | string_scanner: 167 | dependency: transitive 168 | description: 169 | name: string_scanner 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.0.5" 173 | term_glyph: 174 | dependency: transitive 175 | description: 176 | name: term_glyph 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.0" 180 | test_api: 181 | dependency: transitive 182 | description: 183 | name: test_api 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.2.5" 187 | typed_data: 188 | dependency: transitive 189 | description: 190 | name: typed_data 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "1.1.6" 194 | vector_math: 195 | dependency: transitive 196 | description: 197 | name: vector_math 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "2.0.8" 201 | sdks: 202 | dart: ">=2.2.2 <3.0.0" 203 | flutter: ">=1.5.0 <2.0.0" 204 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_blogs 2 | description: A new Flutter application. 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.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | firebase_database: ^3.0.7 27 | intl: ^0.16.0 28 | http: ^0.12.0+2 29 | connectivity: ^0.4.4 30 | image_picker: ^0.6.1+4 31 | firebase_storage: ^3.0.6 32 | 33 | dev_dependencies: 34 | flutter_test: 35 | sdk: flutter 36 | 37 | # For information on the generic Dart part of this file, see the 38 | # following page: https://dart.dev/tools/pub/pubspec 39 | 40 | # The following section is specific to Flutter. 41 | flutter: 42 | 43 | # The following line ensures that the Material Icons font is 44 | # included with your application, so that you can use the icons in 45 | # the material Icons class. 46 | uses-material-design: true 47 | 48 | assets: 49 | - assets/ 50 | 51 | # To add assets to your application, add an assets section, like this: 52 | # assets: 53 | # - images/a_dot_burr.jpeg 54 | # - images/a_dot_ham.jpeg 55 | 56 | # An image asset can refer to one or more resolution-specific "variants", see 57 | # https://flutter.dev/assets-and-images/#resolution-aware. 58 | 59 | # For details regarding adding assets from package dependencies, see 60 | # https://flutter.dev/assets-and-images/#from-packages 61 | 62 | # To add custom fonts to your application, add a fonts section here, 63 | # in this "flutter" section. Each entry in this list should have a 64 | # "family" key with the font family name, and a "fonts" key with a 65 | # list giving the asset and other descriptors for the font. For 66 | # example: 67 | # fonts: 68 | # - family: Schyler 69 | # fonts: 70 | # - asset: fonts/Schyler-Regular.ttf 71 | # - asset: fonts/Schyler-Italic.ttf 72 | # style: italic 73 | # - family: Trajan Pro 74 | # fonts: 75 | # - asset: fonts/TrajanPro.ttf 76 | # - asset: fonts/TrajanPro_Bold.ttf 77 | # weight: 700 78 | # 79 | # For details regarding fonts from package dependencies, 80 | # see https://flutter.dev/custom-fonts/#from-packages 81 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_blogs/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } --------------------------------------------------------------------------------