Skip to content

Commit

Permalink
Recreate projects (tomgilder#261)
Browse files Browse the repository at this point in the history
* Recreate book_store project

* Recreate deep_linking project

* Fix warnings

* Recreate mobile_app

* Fix mobile_app warnings

* Recreate simple_example

* Fix simple_example warnings
  • Loading branch information
tomgilder authored Mar 12, 2022
1 parent d55bc59 commit 78e7e13
Show file tree
Hide file tree
Showing 195 changed files with 4,728 additions and 485 deletions.
2 changes: 1 addition & 1 deletion example/book_store/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c
revision: 7e9793dee1b85a243edd0e06cb1658e98b077561
channel: stable

project_type: app
4 changes: 3 additions & 1 deletion example/book_store/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include: package:flutter_lints/flutter.yaml

analyzer:
strong-mode:
implicit-casts: false
Expand All @@ -8,4 +10,4 @@ linter:
prefer_const_constructors: false
prefer_const_constructors_in_immutables: false
prefer_const_declarations: false
prefer_const_literals_to_create_immutables: false
prefer_const_literals_to_create_immutables: false
2 changes: 2 additions & 0 deletions example/book_store/android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
15 changes: 12 additions & 3 deletions example/book_store/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 30
compileSdkVersion flutter.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -35,8 +44,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.book_store"
minSdkVersion 16
targetSdkVersion 30
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
11 changes: 2 additions & 9 deletions example/book_store/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
package="com.example.book_store">
<application
android:label="book_store"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand All @@ -18,15 +20,6 @@
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
Expand Down
6 changes: 3 additions & 3 deletions example/book_store/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand All @@ -14,7 +14,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
2 changes: 2 additions & 0 deletions example/book_store/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
Expand All @@ -18,6 +19,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Expand Down
36 changes: 29 additions & 7 deletions example/book_store/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterScenarios;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.bookStore;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -399,7 +406,8 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -411,12 +419,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterScenarios;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.bookStore;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -430,12 +445,19 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterScenarios;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.bookStore;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -38,8 +36,8 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
Expand Down
2 changes: 2 additions & 0 deletions example/book_store/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Dashazon</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
9 changes: 7 additions & 2 deletions example/book_store/lib/audiobooks_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'book_card.dart';
import 'models.dart';

class AudiobookPage extends StatelessWidget {
const AudiobookPage({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
final tabState = TabPage.of(context);
Expand All @@ -25,7 +27,7 @@ class AudiobookPage extends StatelessWidget {
],
),
),
Container(
SizedBox(
height: 500,
child: TabBarView(
controller: tabState.controller,
Expand All @@ -44,7 +46,10 @@ class AudiobookPage extends StatelessWidget {
class AudiobookListPage extends StatelessWidget {
final String mode;

const AudiobookListPage({required this.mode});
const AudiobookListPage({
Key? key,
required this.mode,
}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
8 changes: 5 additions & 3 deletions example/book_store/lib/book_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ class CustomCard extends StatelessWidget {
final void Function() onTap;

const CustomCard({
Key? key,
required this.onTap,
required this.child,
});
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: SizedBox(
width: 350,
child: Material(
color: Color(0xfffebd68),
Expand All @@ -42,10 +43,11 @@ class BookCard extends StatelessWidget {
final String Function(String id)? pathBuilder;

const BookCard({
Key? key,
required this.book,
this.showReleaseDate = false,
this.pathBuilder,
});
}) : super(key: key);

static final _formatter = DateFormat('yyyy-MM-dd');

Expand Down
5 changes: 4 additions & 1 deletion example/book_store/lib/book_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import 'page_scaffold.dart';
class BookPage extends StatelessWidget {
final String id;

const BookPage({required this.id});
const BookPage({
Key? key,
required this.id,
}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 4 additions & 1 deletion example/book_store/lib/category_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import 'page_scaffold.dart';
class CategoryPage extends StatelessWidget {
final BookCategory category;

const CategoryPage({required this.category});
const CategoryPage({
Key? key,
required this.category,
}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
3 changes: 2 additions & 1 deletion example/book_store/lib/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ class LoginPage extends StatefulWidget {
final String? redirectTo;

const LoginPage({
Key? key,
this.redirectTo = '/',
});
}) : super(key: key);

@override
_LoginPageState createState() => _LoginPageState();
Expand Down
5 changes: 4 additions & 1 deletion example/book_store/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ class BookStoreApp extends StatelessWidget {
final RouteInformationProvider? routeInformationProvider;

BookStoreApp({
Key? key,
this.username,
this.siteBlockedWithoutLogin = false,
this.routeInformationProvider,
});
}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -168,6 +169,8 @@ class BookStoreApp extends StatelessWidget {
}

class ShopHome extends StatelessWidget {
const ShopHome({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return PageScaffold(
Expand Down
4 changes: 2 additions & 2 deletions example/book_store/lib/models.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ class AppState extends ChangeNotifier {

bool get isLoggedIn => _username != null;

String? _username = null;
String? _username;
String? get username => _username;
set username(String? value) {
_username = value;
notifyListeners();
}

List<Wishlist> _wishlists = [
final List<Wishlist> _wishlists = [
Wishlist(
bookIds: ['1', '2'],
username: 'dash',
Expand Down
Loading

0 comments on commit 78e7e13

Please sign in to comment.