chore: remove deprecated bricks
47
apps/wyatt_clean_code/.gitignore
vendored
@ -1,47 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
@ -1,30 +0,0 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled.
|
||||
|
||||
version:
|
||||
revision: f1875d570e39de09040c8f79aa13cc56baab8db1
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
|
||||
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
|
||||
- platform: web
|
||||
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
|
||||
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
125
apps/wyatt_clean_code/.vscode/launch.json
vendored
@ -1,125 +0,0 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch development",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_development.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"development",
|
||||
"--target",
|
||||
"lib/main_development.dart"
|
||||
],
|
||||
"flutterMode": "debug"
|
||||
},
|
||||
{
|
||||
"name": "Launch development in profile mode",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_development.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"development",
|
||||
"--target",
|
||||
"lib/main_development.dart"
|
||||
],
|
||||
"flutterMode": "profile"
|
||||
},
|
||||
{
|
||||
"name": "Launch development in release mode",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_development.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"development",
|
||||
"--target",
|
||||
"lib/main_development.dart"
|
||||
],
|
||||
"flutterMode": "release"
|
||||
},
|
||||
{
|
||||
"name": "Launch staging",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_staging.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"staging",
|
||||
"--target",
|
||||
"lib/main_staging.dart"
|
||||
],
|
||||
"flutterMode": "debug"
|
||||
},
|
||||
{
|
||||
"name": "Launch staging in profile mode",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_staging.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"staging",
|
||||
"--target",
|
||||
"lib/main_staging.dart"
|
||||
],
|
||||
"flutterMode": "profile"
|
||||
},
|
||||
{
|
||||
"name": "Launch staging in release mode",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_staging.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"staging",
|
||||
"--target",
|
||||
"lib/main_staging.dart"
|
||||
],
|
||||
"flutterMode": "release"
|
||||
},
|
||||
{
|
||||
"name": "Launch production",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_production.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"production",
|
||||
"--target",
|
||||
"lib/main_production.dart"
|
||||
],
|
||||
"flutterMode": "debug"
|
||||
},
|
||||
{
|
||||
"name": "Launch production in profile mode",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_production.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"production",
|
||||
"--target",
|
||||
"lib/main_production.dart"
|
||||
],
|
||||
"flutterMode": "profile"
|
||||
},
|
||||
{
|
||||
"name": "Launch production in release mode",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"program": "lib/main_production.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"production",
|
||||
"--target",
|
||||
"lib/main_production.dart"
|
||||
],
|
||||
"flutterMode": "release"
|
||||
},
|
||||
]
|
||||
}
|
14
apps/wyatt_clean_code/.vscode/settings.json
vendored
@ -1,14 +0,0 @@
|
||||
{
|
||||
"bloc.newCubitTemplate.type": "equatable",
|
||||
"psi-header.config": {
|
||||
"blankLinesAfter": 0,
|
||||
"forceToTop": true,
|
||||
},
|
||||
"psi-header.templates": [
|
||||
{
|
||||
"language": "*",
|
||||
"template": [],
|
||||
// disabled,
|
||||
}
|
||||
],
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
.PHONY: help clean get upgrade format lint gen watch run-dev run-stg run-prod
|
||||
|
||||
# Adding a help file: https://gist.github.com/prwhite/8168133#gistcomment-1313022
|
||||
help: ## This help dialog.
|
||||
@IFS=$$'\n' ; \
|
||||
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
|
||||
for help_line in $${help_lines[@]}; do \
|
||||
IFS=$$'#' ; \
|
||||
help_split=($$help_line) ; \
|
||||
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||
printf "%-30s %s\n" $$help_command $$help_info ; \
|
||||
done
|
||||
|
||||
clean: ## Cleans the environment.
|
||||
@echo "• Cleaning the project..."
|
||||
@rm -rf pubspec.lock
|
||||
@flutter clean
|
||||
|
||||
get: ## Gets the dependencies.
|
||||
@echo "• Getting the dependencies..."
|
||||
@flutter pub get
|
||||
|
||||
upgrade: clean ## Upgrades dependencies.
|
||||
@echo "• Upgrading dependencies..."
|
||||
@flutter pub upgrade
|
||||
|
||||
format: ## Formats the code.
|
||||
@echo "• Formatting the code"
|
||||
@dart format . --fix
|
||||
|
||||
lint: ## Lints the code.
|
||||
@echo "• Verifying code..."
|
||||
@dart analyze . || (echo "Error in project"; exit 1)
|
||||
|
||||
gen: get ## Run build_runner build (Freezed, Fluttergen, Hive etc...)
|
||||
@echo "• build_runner build"
|
||||
@flutter pub run build_runner build
|
||||
|
||||
watch: get ## Run build_runner watch (Freezed, Fluttergen, Hive etc...)
|
||||
@echo "• build_runner watch"
|
||||
@flutter pub run build_runner watch
|
||||
|
||||
run-dev: ## Run app in development mode
|
||||
@echo "• Running the app (development)"
|
||||
@flutter run --flavor development --target lib/main_development.dart
|
||||
|
||||
run-stg: ## Run app in staging mode
|
||||
@echo "• Running the app (staging)"
|
||||
@flutter run --flavor staging --target lib/main_staging.dart
|
||||
|
||||
run-prod: ## Run app in production mode
|
||||
@echo "• Running the app (production)"
|
||||
@flutter run --flavor production --target lib/main_production.dart
|
@ -1,16 +0,0 @@
|
||||
# wyatt_clean_code
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
@ -1,35 +0,0 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter by
|
||||
# Wyatt Studio, for apps packages, and plugins designed to
|
||||
# encourage good coding practices.
|
||||
include: package:wyatt_analysis/analysis_options.flutter.yaml
|
||||
|
||||
analyzer:
|
||||
exclude:
|
||||
- '**/*.g.dart'
|
||||
- '**/*.freezed.dart'
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
13
apps/wyatt_clean_code/android/.gitignore
vendored
@ -1,13 +0,0 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
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
|
@ -1,117 +0,0 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.wyatt_clean_code"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
if (System.getenv("ANDROID_KEYSTORE_PATH")) {
|
||||
release {
|
||||
storeFile file(System.getenv("ANDROID_KEYSTORE_PATH"))
|
||||
keyAlias System.getenv("ANDROID_KEYSTORE_ALIAS")
|
||||
keyPassword System.getenv("ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
|
||||
storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD")
|
||||
}
|
||||
} else {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "default"
|
||||
productFlavors {
|
||||
production {
|
||||
dimension "default"
|
||||
applicationIdSuffix ""
|
||||
manifestPlaceholders = [appName: "Wyatt Demo"]
|
||||
}
|
||||
staging {
|
||||
dimension "default"
|
||||
applicationIdSuffix ".stg"
|
||||
manifestPlaceholders = [appName: "[STG] Wyatt Demo"]
|
||||
}
|
||||
development {
|
||||
dimension "default"
|
||||
applicationIdSuffix ".dev"
|
||||
manifestPlaceholders = [appName: "[DEV] Wyatt Demo"]
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt')
|
||||
}
|
||||
debug {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.wyatt_clean_code">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
@ -1,34 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.wyatt_clean_code">
|
||||
<application
|
||||
android:label="wyatt_clean_code"
|
||||
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"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
@ -1,6 +0,0 @@
|
||||
package com.example.wyatt_clean_code
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB |
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
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>
|
||||
</style>
|
||||
</resources>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
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>
|
||||
</style>
|
||||
</resources>
|
@ -1,8 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.wyatt_clean_code">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
@ -1,31 +0,0 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
@ -1,6 +0,0 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
@ -1,11 +0,0 @@
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="seedColor" type="material material-accent">#FF2196F3</color>
|
||||
|
||||
<color name="lightPrimary">#FF0061A6</color>
|
||||
<color name="lightOnPrimary">#FFFFFFFF</color>
|
||||
<color name="lightPrimaryContainer">#FFD0E4FF</color>
|
||||
<color name="lightOnPrimaryContainer">#FF001D36</color>
|
||||
|
||||
<color name="lightSecondary">#FF535F70</color>
|
||||
<color name="lightOnSecondary">#FFFFFFFF</color>
|
||||
<color name="lightSecondaryContainer">#FFD6E3F7</color>
|
||||
<color name="lightOnSecondaryContainer">#FF101C2B</color>
|
||||
|
||||
<color name="lightError">#FFBA1B1B</color>
|
||||
<color name="lightOnError">#FFFFFFFF</color>
|
||||
<color name="lightErrorContainer">#FFFFDAD4</color>
|
||||
<color name="lightOnErrorContainer">#FF410001</color>
|
||||
|
||||
<color name="lightBackground">#FFFDFCFF</color>
|
||||
<color name="lightOnBackground">#FF1B1B1B</color>
|
||||
<color name="lightSurface">#FFFDFCFF</color>
|
||||
<color name="lightOnSurface">#FF1B1B1B</color>
|
||||
<color name="lightSurfaceVariant">#FFDFE2EB</color>
|
||||
<color name="lightOnSurfaceVariant">#FF42474E</color>
|
||||
<color name="lightOutline">#FF73777F</color>
|
||||
<color name="lightShadow">#FF000000</color>
|
||||
|
||||
<color name="lightInverseSurface">#FF2F3033</color>
|
||||
<color name="lightOnInverseSurface">#FFF1F0F4</color>
|
||||
<color name="lightInversePrimary">#FF9CCAFF</color>
|
||||
|
||||
|
||||
<color name="darkPrimary">#FF9CCAFF</color>
|
||||
<color name="darkOnPrimary">#FF00325A</color>
|
||||
<color name="darkPrimaryContainer">#FF00497F</color>
|
||||
<color name="darkOnPrimaryContainer">#FFD0E4FF</color>
|
||||
|
||||
<color name="darkSecondary">#FFBBC8DB</color>
|
||||
<color name="darkOnSecondary">#FF253140</color>
|
||||
<color name="darkSecondaryContainer">#FF3C4858</color>
|
||||
<color name="darkOnSecondaryContainer">#FFD6E3F7</color>
|
||||
|
||||
<color name="darkError">#FFFFB4A9</color>
|
||||
<color name="darkOnError">#FF680003</color>
|
||||
<color name="darkErrorContainer">#FF930006</color>
|
||||
<color name="darkOnErrorContainer">#FFFFB4A9</color>
|
||||
|
||||
<color name="darkBackground">#FF1B1B1B</color>
|
||||
<color name="darkOnBackground">#FFE2E2E6</color>
|
||||
<color name="darkSurface">#FF1B1B1B</color>
|
||||
<color name="darkOnSurface">#FFE2E2E6</color>
|
||||
<color name="darkSurfaceVariant">#FF42474E</color>
|
||||
<color name="darkOnSurfaceVariant">#FFC3C7D0</color>
|
||||
<color name="darkOutline">#FF8D9199</color>
|
||||
<color name="darkShadow">#FF000000</color>
|
||||
|
||||
<color name="darkInverseSurface">#FFE2E2E6</color>
|
||||
<color name="darkOnInverseSurface">#FF2F3033</color>
|
||||
<color name="darkInversePrimary">#FF0061A6</color>
|
||||
</resources>
|
@ -1 +0,0 @@
|
||||
# just to keep empty folder in brick generation
|
Before Width: | Height: | Size: 11 KiB |
@ -1,20 +0,0 @@
|
||||
{
|
||||
"@@locale": "fr",
|
||||
"counterAppBarTitle": "Compteur",
|
||||
"@counterAppBarTitle": {
|
||||
"description": "Texte affiché dans l'AppBar de la page Compteur"
|
||||
},
|
||||
"youHavePushed": "Vous avez appuyé {count} fois sur le bouton !",
|
||||
"@youHavePushed": {
|
||||
"description": "Message affiché sur la page compteur",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "int"
|
||||
}
|
||||
}
|
||||
},
|
||||
"goToCounter": "Aller au Compteur",
|
||||
"@goToCounter": {
|
||||
"description": "Texte affiché dans le bouton ammenant vers la page Compteur"
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
make clean
|
||||
rm -rf .idea
|
||||
rm -f wyatt_clean_code.iml
|
||||
rm .fvm/flutter_sdk
|
||||
cd ../../
|
||||
echo "Brick generator..."
|
||||
dart tools/brick_generator/bin/brick_generator.dart wyatt_clean_code wyatt_clean_code wyatt-clean-code "Wyatt Demo" com.example.wyatt_clean_code
|
||||
|
||||
echo "Make platforms optional..."
|
||||
mkdir bricks/wyatt_clean_code/__brick__/{{#enable_android}}android\{\{
|
||||
mv -f bricks/wyatt_clean_code/__brick__/android/ bricks/wyatt_clean_code/__brick__/{{#enable_android}}android{{/enable_android}}
|
||||
|
||||
mkdir bricks/wyatt_clean_code/__brick__/{{#enable_ios}}ios\{\{
|
||||
mv -f bricks/wyatt_clean_code/__brick__/ios/ bricks/wyatt_clean_code/__brick__/{{#enable_ios}}ios{{/enable_ios}}
|
||||
|
||||
mkdir bricks/wyatt_clean_code/__brick__/{{#enable_web}}web\{\{
|
||||
mv -f bricks/wyatt_clean_code/__brick__/web/ bricks/wyatt_clean_code/__brick__/{{#enable_web}}web{{/enable_web}}
|
||||
|
||||
rm bricks/wyatt_clean_code/__brick__/generate.sh
|
||||
rm -rf bricks/wyatt_clean_code/__brick__/.fvm/flutter_sdk
|
34
apps/wyatt_clean_code/ios/.gitignore
vendored
@ -1,34 +0,0 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1340"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1340"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,78 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1340"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,13 +0,0 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
@ -1,5 +0,0 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
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.
|
@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Wyatt Clean Code</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>wyatt_clean_code</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1 +0,0 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
@ -1,4 +0,0 @@
|
||||
arb-dir: assets/l10n
|
||||
template-arb-file: intl_fr.arb
|
||||
output-localization-file: app_localizations.dart
|
||||
nullable-getter: false
|
@ -1,46 +0,0 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:wyatt_clean_code/core/dependency_injection/get_it.dart';
|
||||
import 'package:wyatt_clean_code/core/flavors/flavor_settings.dart';
|
||||
import 'package:wyatt_clean_code/core/utils/app_bloc_observer.dart';
|
||||
import 'package:wyatt_clean_code/core/utils/wyatt_printer.dart';
|
||||
|
||||
Future<void> bootstrap(FutureOr<Widget> Function() builder) async {
|
||||
await runZonedGuarded(
|
||||
() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
FlutterError.onError = (details) {
|
||||
WyattPrinter.get().e(
|
||||
'',
|
||||
details,
|
||||
details.stack,
|
||||
);
|
||||
};
|
||||
|
||||
FlavorSettings.init();
|
||||
GetItInitializer.run();
|
||||
|
||||
GoRouter.setUrlPathStrategy(UrlPathStrategy.path);
|
||||
|
||||
if (!kReleaseMode) {
|
||||
final env = FlavorSettings.get();
|
||||
WyattPrinter.get().i('Flavor : ${env.flavor.name}');
|
||||
}
|
||||
|
||||
await BlocOverrides.runZoned(
|
||||
() async => runApp(await builder()),
|
||||
blocObserver: AppBlocObserver(),
|
||||
);
|
||||
},
|
||||
(error, stackTrace) => WyattPrinter.get().e(
|
||||
'',
|
||||
error,
|
||||
stackTrace,
|
||||
),
|
||||
);
|
||||
}
|
@ -1 +0,0 @@
|
||||
# just to keep empty folder in brick generation
|
@ -1,15 +0,0 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:get_it/get_it.dart';
|
||||
|
||||
final getIt = GetIt.I;
|
||||
|
||||
abstract class GetItInitializer {
|
||||
static Future<void> init() async {
|
||||
// Here, register data sources
|
||||
}
|
||||
|
||||
static void run() {
|
||||
unawaited(init());
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
/// Generate colors with `flutter pub run build_runner build`
|
||||
export 'package:wyatt_clean_code/gen/colors.gen.dart';
|
@ -1,235 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
|
||||
/// Geometric progression.
|
||||
abstract class AppSizing {
|
||||
/// Default to 1
|
||||
static const double factor = 1;
|
||||
|
||||
/// SizedBox.shrink();
|
||||
static const SizedBox empty = SizedBox.shrink();
|
||||
|
||||
/// xxs = factor * 2
|
||||
static const double xxs = factor * 2;
|
||||
|
||||
/// xs = factor * 4
|
||||
static const double xs = factor * 4;
|
||||
|
||||
/// s = factor * 8
|
||||
static const double s = factor * 8;
|
||||
|
||||
/// m = factor * 16
|
||||
static const double m = factor * 16;
|
||||
|
||||
/// l = factor * 32
|
||||
static const double l = factor * 32;
|
||||
|
||||
/// xl = factor * 64
|
||||
static const double xl = factor * 64;
|
||||
|
||||
/// xxl = factor * 128
|
||||
static const double xxl = factor * 128;
|
||||
|
||||
/// xxs = factor * 2
|
||||
static const Gap xxsGap = Gap(xxs);
|
||||
|
||||
/// xs = factor * 4
|
||||
static const Gap xsGap = Gap(xs);
|
||||
|
||||
/// s = factor * 8
|
||||
static const Gap sGap = Gap(s);
|
||||
|
||||
/// m = factor * 16
|
||||
static const Gap mGap = Gap(m);
|
||||
|
||||
/// l = factor * 32
|
||||
static const Gap lGap = Gap(l);
|
||||
|
||||
/// xl = factor * 64
|
||||
static const Gap xlGap = Gap(xl);
|
||||
|
||||
/// xxl = factor * 128
|
||||
static const Gap xxlGap = Gap(xxl);
|
||||
|
||||
/// xxs = factor * 2
|
||||
static const Radius xxsRadius = Radius.circular(xxs);
|
||||
|
||||
/// xs = factor * 4
|
||||
static const Radius xsRadius = Radius.circular(xs);
|
||||
|
||||
/// s = factor * 8
|
||||
static const Radius sRadius = Radius.circular(s);
|
||||
|
||||
/// m = factor * 16
|
||||
static const Radius mRadius = Radius.circular(m);
|
||||
|
||||
/// l = factor * 32
|
||||
static const Radius lRadius = Radius.circular(l);
|
||||
|
||||
/// xl = factor * 64
|
||||
static const Radius xlRadius = Radius.circular(xl);
|
||||
|
||||
/// xxl = factor * 128
|
||||
static const Radius xxlRadius = Radius.circular(xxl);
|
||||
|
||||
/// xxs = factor * 2
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets xxsSquareInset = EdgeInsets.all(xxs);
|
||||
|
||||
/// xs = factor * 4
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets xsSquareInset = EdgeInsets.all(xs);
|
||||
|
||||
/// s = factor * 8
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets sSquareInset = EdgeInsets.all(s);
|
||||
|
||||
/// m = factor * 16
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets mSquareInset = EdgeInsets.all(m);
|
||||
|
||||
/// l = factor * 32
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets lSquareInset = EdgeInsets.all(l);
|
||||
|
||||
/// xl = factor * 64
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets xlSquareInset = EdgeInsets.all(xl);
|
||||
|
||||
/// xxl = factor * 128
|
||||
///
|
||||
/// A square inset offers indents content on all four sides.
|
||||
///
|
||||
/// *e.g [EdgeInsets.all(value)]*
|
||||
static const EdgeInsets xxlSquareInset = EdgeInsets.all(xxl);
|
||||
|
||||
/// xxs = factor * 2
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets xxsSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: xxs, vertical: xxs / 2);
|
||||
|
||||
/// xs = factor * 4
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets xsSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: xs, vertical: xs / 2);
|
||||
|
||||
/// s = factor * 8
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets sSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: s, vertical: s / 2);
|
||||
|
||||
/// m = factor * 16
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets mSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: m, vertical: m / 2);
|
||||
|
||||
/// l = factor * 32
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets lSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: l, vertical: l / 2);
|
||||
|
||||
/// xl = factor * 64
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets xlSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: xl, vertical: xl / 2);
|
||||
|
||||
/// xxl = factor * 128
|
||||
///
|
||||
/// A squished inset reduces space top and bottom by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(horizontal: value, vertical: value / 2)]*
|
||||
static const EdgeInsets xxlSquishInset =
|
||||
EdgeInsets.symmetric(horizontal: xxl, vertical: xxl / 2);
|
||||
|
||||
/// xxs = factor * 2
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets xxsStretchInset =
|
||||
EdgeInsets.symmetric(vertical: xxs, horizontal: xxs / 2);
|
||||
|
||||
/// xs = factor * 4
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets xsStretchInset =
|
||||
EdgeInsets.symmetric(vertical: xs, horizontal: xs / 2);
|
||||
|
||||
/// s = factor * 8
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets sStretchInset =
|
||||
EdgeInsets.symmetric(vertical: s, horizontal: s / 2);
|
||||
|
||||
/// m = factor * 16
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets mStretchInset =
|
||||
EdgeInsets.symmetric(vertical: m, horizontal: m / 2);
|
||||
|
||||
/// l = factor * 32
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets lStretchInset =
|
||||
EdgeInsets.symmetric(vertical: l, horizontal: l / 2);
|
||||
|
||||
/// xl = factor * 64
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets xlStretchInset =
|
||||
EdgeInsets.symmetric(vertical: xl, horizontal: xl / 2);
|
||||
|
||||
/// xxl = factor * 128
|
||||
///
|
||||
/// A stretched inset reduces space left and right by 50%.
|
||||
///
|
||||
/// *e.g [EdgeInsets.symmetric(vertical: value, horizontal: value / 2)]*
|
||||
static const EdgeInsets xxlStretchInset =
|
||||
EdgeInsets.symmetric(vertical: xxl, horizontal: xxl / 2);
|
||||
}
|
@ -1,240 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wyatt_clean_code/core/design_system/colors.dart';
|
||||
import 'package:wyatt_clean_code/core/design_system/typography.dart';
|
||||
|
||||
const _smallTextScaleFactor = 0.80;
|
||||
const _largeTextScaleFactor = 1.20;
|
||||
|
||||
/// Namespace for the [ThemeData].
|
||||
class AppTheme {
|
||||
/// Light `ThemeData` for UI.
|
||||
static ThemeData get light => ThemeData(
|
||||
colorScheme: ColorScheme.fromSwatch(
|
||||
primarySwatch: ColorName.seedColor,
|
||||
accentColor: ColorName.seedColorAccent,
|
||||
cardColor: ColorName.lightBackground,
|
||||
backgroundColor: ColorName.lightBackground,
|
||||
errorColor: ColorName.lightError,
|
||||
),
|
||||
appBarTheme: _appBarLightTheme,
|
||||
elevatedButtonTheme: _elevatedButtonLightTheme,
|
||||
outlinedButtonTheme: _outlinedButtonLightTheme,
|
||||
textTheme: _textTheme(),
|
||||
dialogTheme: _dialogLightTheme,
|
||||
tooltipTheme: _tooltipLightTheme,
|
||||
bottomSheetTheme: _bottomSheetLightTheme,
|
||||
tabBarTheme: _tabBarLightTheme,
|
||||
dividerTheme: _dividerLightTheme,
|
||||
backgroundColor: ColorName.lightBackground,
|
||||
);
|
||||
|
||||
/// dark `ThemeData` for UI.
|
||||
static ThemeData get dark => ThemeData(
|
||||
colorScheme: ColorScheme.fromSwatch(
|
||||
primarySwatch: ColorName.seedColor,
|
||||
accentColor: ColorName.darkSecondary,
|
||||
cardColor: ColorName.darkBackground,
|
||||
backgroundColor: ColorName.darkBackground,
|
||||
errorColor: ColorName.darkError,
|
||||
brightness: Brightness.dark,
|
||||
),
|
||||
appBarTheme: _appBarDarkTheme,
|
||||
elevatedButtonTheme: _elevatedButtonDarkTheme,
|
||||
outlinedButtonTheme: _outlinedButtonDarkTheme,
|
||||
textTheme: _textTheme(isDark: true),
|
||||
dialogTheme: _dialogDarkTheme,
|
||||
tooltipTheme: _tooltipDarkTheme,
|
||||
bottomSheetTheme: _bottomSheetDarkTheme,
|
||||
tabBarTheme: _tabBarDarkTheme,
|
||||
dividerTheme: _dividerDarkTheme,
|
||||
backgroundColor: ColorName.darkBackground,
|
||||
canvasColor: ColorName.darkBackground,
|
||||
);
|
||||
|
||||
/// `ThemeData` for UI for small screens.
|
||||
static ThemeData get lightSmall =>
|
||||
light.copyWith(textTheme: _smallTextTheme());
|
||||
|
||||
/// `ThemeData` for UI for medium screens.
|
||||
static ThemeData get lightMedium =>
|
||||
light.copyWith(textTheme: _smallTextTheme());
|
||||
|
||||
/// `ThemeData` for UI for large screens.
|
||||
static ThemeData get lightLarge =>
|
||||
light.copyWith(textTheme: _largeTextTheme());
|
||||
|
||||
/// `ThemeData` for UI for small screens.
|
||||
static ThemeData get darkSmall =>
|
||||
dark.copyWith(textTheme: _smallTextTheme(isDark: true));
|
||||
|
||||
/// `ThemeData` for UI for medium screens.
|
||||
static ThemeData get darkMedium =>
|
||||
dark.copyWith(textTheme: _smallTextTheme(isDark: true));
|
||||
|
||||
/// `ThemeData` for UI for large screens.
|
||||
static ThemeData get darkLarge =>
|
||||
dark.copyWith(textTheme: _largeTextTheme(isDark: true));
|
||||
|
||||
static TextTheme _textTheme({bool isDark = false}) => TextTheme(
|
||||
headline1: AppTypography.headline1,
|
||||
headline2: AppTypography.headline2,
|
||||
headline3: AppTypography.headline3,
|
||||
headline4: AppTypography.headline4,
|
||||
headline5: AppTypography.headline5,
|
||||
headline6: AppTypography.headline6,
|
||||
subtitle1: AppTypography.subtitle1,
|
||||
subtitle2: AppTypography.subtitle2,
|
||||
bodyText1: AppTypography.bodyText1,
|
||||
bodyText2: AppTypography.bodyText2,
|
||||
caption: AppTypography.caption,
|
||||
overline: AppTypography.overline,
|
||||
button: AppTypography.button,
|
||||
).apply(
|
||||
bodyColor:
|
||||
isDark ? ColorName.darkOnBackground : ColorName.lightOnBackground,
|
||||
displayColor:
|
||||
isDark ? ColorName.darkOnBackground : ColorName.lightOnBackground,
|
||||
);
|
||||
|
||||
static TextTheme _smallTextTheme({bool isDark = false}) =>
|
||||
_textTheme(isDark: isDark).apply(fontSizeFactor: _smallTextScaleFactor);
|
||||
|
||||
static TextTheme _largeTextTheme({bool isDark = false}) =>
|
||||
_textTheme(isDark: isDark).apply(fontSizeFactor: _largeTextScaleFactor);
|
||||
|
||||
static AppBarTheme get _appBarLightTheme =>
|
||||
const AppBarTheme(color: ColorName.lightPrimary);
|
||||
|
||||
static AppBarTheme get _appBarDarkTheme =>
|
||||
const AppBarTheme(color: ColorName.darkSurfaceVariant);
|
||||
|
||||
static ElevatedButtonThemeData get _elevatedButtonLightTheme =>
|
||||
ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
elevation: 0,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
),
|
||||
primary: ColorName.lightPrimary,
|
||||
fixedSize: const Size(208, 54),
|
||||
),
|
||||
);
|
||||
|
||||
static ElevatedButtonThemeData get _elevatedButtonDarkTheme =>
|
||||
ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
elevation: 0,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
),
|
||||
primary: ColorName.darkPrimary,
|
||||
fixedSize: const Size(208, 54),
|
||||
),
|
||||
);
|
||||
|
||||
static OutlinedButtonThemeData get _outlinedButtonLightTheme =>
|
||||
OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
),
|
||||
side: const BorderSide(color: ColorName.lightOutline, width: 2),
|
||||
primary: ColorName.lightPrimary,
|
||||
fixedSize: const Size(208, 54),
|
||||
),
|
||||
);
|
||||
|
||||
static OutlinedButtonThemeData get _outlinedButtonDarkTheme =>
|
||||
OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
),
|
||||
side: const BorderSide(color: ColorName.darkOutline, width: 2),
|
||||
primary: ColorName.darkPrimary,
|
||||
fixedSize: const Size(208, 54),
|
||||
),
|
||||
);
|
||||
|
||||
static TooltipThemeData get _tooltipLightTheme => const TooltipThemeData(
|
||||
decoration: BoxDecoration(
|
||||
color: ColorName.lightInverseSurface,
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
),
|
||||
padding: EdgeInsets.all(10),
|
||||
textStyle: TextStyle(color: ColorName.lightOnInverseSurface),
|
||||
);
|
||||
|
||||
static TooltipThemeData get _tooltipDarkTheme => const TooltipThemeData(
|
||||
decoration: BoxDecoration(
|
||||
color: ColorName.darkInverseSurface,
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
),
|
||||
padding: EdgeInsets.all(10),
|
||||
textStyle: TextStyle(color: ColorName.darkOnInverseSurface),
|
||||
);
|
||||
|
||||
static DialogTheme get _dialogLightTheme => DialogTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
);
|
||||
|
||||
static DialogTheme get _dialogDarkTheme => DialogTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
);
|
||||
|
||||
static BottomSheetThemeData get _bottomSheetLightTheme =>
|
||||
const BottomSheetThemeData(
|
||||
backgroundColor: ColorName.lightBackground,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(12)),
|
||||
),
|
||||
);
|
||||
|
||||
static BottomSheetThemeData get _bottomSheetDarkTheme =>
|
||||
const BottomSheetThemeData(
|
||||
backgroundColor: ColorName.darkBackground,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(12)),
|
||||
),
|
||||
);
|
||||
|
||||
static TabBarTheme get _tabBarLightTheme => const TabBarTheme(
|
||||
indicator: UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
width: 2,
|
||||
color: ColorName.lightPrimary,
|
||||
),
|
||||
),
|
||||
labelColor: ColorName.lightPrimary,
|
||||
unselectedLabelColor: ColorName.lightOutline,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
);
|
||||
|
||||
static TabBarTheme get _tabBarDarkTheme => const TabBarTheme(
|
||||
indicator: UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
width: 2,
|
||||
color: ColorName.darkPrimary,
|
||||
),
|
||||
),
|
||||
labelColor: ColorName.darkPrimary,
|
||||
unselectedLabelColor: ColorName.darkOutline,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
);
|
||||
|
||||
static DividerThemeData get _dividerLightTheme => const DividerThemeData(
|
||||
space: 0,
|
||||
thickness: 1,
|
||||
color: ColorName.lightOutline,
|
||||
);
|
||||
|
||||
static DividerThemeData get _dividerDarkTheme => const DividerThemeData(
|
||||
space: 0,
|
||||
thickness: 1,
|
||||
color: ColorName.darkOutline,
|
||||
);
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
abstract class AppFontWeight {
|
||||
/// FontWeight value of `w900`
|
||||
static const FontWeight black = FontWeight.w900;
|
||||
|
||||
/// FontWeight value of `w800`
|
||||
static const FontWeight extraBold = FontWeight.w800;
|
||||
|
||||
/// FontWeight value of `w700`
|
||||
static const FontWeight bold = FontWeight.w700;
|
||||
|
||||
/// FontWeight value of `w600`
|
||||
static const FontWeight semiBold = FontWeight.w600;
|
||||
|
||||
/// FontWeight value of `w500`
|
||||
static const FontWeight medium = FontWeight.w500;
|
||||
|
||||
/// FontWeight value of `w400`
|
||||
static const FontWeight regular = FontWeight.w400;
|
||||
|
||||
/// FontWeight value of `w300`
|
||||
static const FontWeight light = FontWeight.w300;
|
||||
|
||||
/// FontWeight value of `w200`
|
||||
static const FontWeight extraLight = FontWeight.w200;
|
||||
|
||||
/// FontWeight value of `w100`
|
||||
static const FontWeight thin = FontWeight.w100;
|
||||
}
|
||||
|
||||
class AppTypography {
|
||||
static const TextStyle _base = TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: AppFontWeight.regular,
|
||||
);
|
||||
|
||||
/// Headline 1 Text Style
|
||||
static TextStyle get headline1 => _base.copyWith(
|
||||
fontSize: 56,
|
||||
fontWeight: AppFontWeight.medium,
|
||||
);
|
||||
|
||||
/// Headline 2 Text Style
|
||||
static TextStyle get headline2 => _base.copyWith(
|
||||
fontSize: 30,
|
||||
fontWeight: AppFontWeight.regular,
|
||||
);
|
||||
|
||||
/// Headline 3 Text Style
|
||||
static TextStyle get headline3 => _base.copyWith(
|
||||
fontSize: 28,
|
||||
fontWeight: AppFontWeight.regular,
|
||||
);
|
||||
|
||||
/// Headline 4 Text Style
|
||||
static TextStyle get headline4 => _base.copyWith(
|
||||
fontSize: 22,
|
||||
fontWeight: AppFontWeight.bold,
|
||||
);
|
||||
|
||||
/// Headline 5 Text Style
|
||||
static TextStyle get headline5 => _base.copyWith(
|
||||
fontSize: 20,
|
||||
fontWeight: AppFontWeight.medium,
|
||||
);
|
||||
|
||||
/// Headline 6 Text Style
|
||||
static TextStyle get headline6 => _base.copyWith(
|
||||
fontSize: 22,
|
||||
fontWeight: AppFontWeight.bold,
|
||||
);
|
||||
|
||||
/// Subtitle 1 Text Style
|
||||
static TextStyle get subtitle1 => _base.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: AppFontWeight.bold,
|
||||
);
|
||||
|
||||
/// Subtitle 2 Text Style
|
||||
static TextStyle get subtitle2 => _base.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: AppFontWeight.bold,
|
||||
);
|
||||
|
||||
/// Body Text 1 Text Style
|
||||
static TextStyle get bodyText1 => _base.copyWith(
|
||||
fontSize: 18,
|
||||
fontWeight: AppFontWeight.medium,
|
||||
);
|
||||
|
||||
/// Body Text 2 Text Style (the default)
|
||||
static TextStyle get bodyText2 => _base.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: AppFontWeight.regular,
|
||||
);
|
||||
|
||||
/// Caption Text Style
|
||||
static TextStyle get caption => _base.copyWith(
|
||||
fontSize: 14,
|
||||
fontWeight: AppFontWeight.regular,
|
||||
);
|
||||
|
||||
/// Overline Text Style
|
||||
static TextStyle get overline => _base.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: AppFontWeight.regular,
|
||||
);
|
||||
|
||||
/// Button Text Style
|
||||
static TextStyle get button => _base.copyWith(
|
||||
fontSize: 18,
|
||||
fontWeight: AppFontWeight.medium,
|
||||
);
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
enum AppExceptionType {
|
||||
network,
|
||||
api,
|
||||
database,
|
||||
cache,
|
||||
assertion,
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
enum Flavor {
|
||||
development('dev', Colors.red),
|
||||
staging('stg', Colors.blue),
|
||||
production('prod', Colors.green);
|
||||
|
||||
final String short;
|
||||
final Color color;
|
||||
|
||||
const Flavor(this.short, this.color);
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:wyatt_clean_code/core/enums/exception_type.dart';
|
||||
|
||||
abstract class AppException extends Equatable implements Exception {
|
||||
final String message;
|
||||
final AppExceptionType type;
|
||||
|
||||
AppException(this.type, [String? message]) : message = message ?? type.name;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message, type];
|
||||
|
||||
@override
|
||||
String toString() => message;
|
||||
}
|
||||
|
||||
class ClientException extends AppException {
|
||||
ClientException(super.type, [super.message]);
|
||||
|
||||
@override
|
||||
String toString() => 'ClientException: ${super.toString()}';
|
||||
}
|
||||
|
||||
class ServerException extends AppException {
|
||||
ServerException(super.type, [super.message]);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerException: ${super.toString()}';
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
export 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
extension BuildContextX on BuildContext {
|
||||
AppLocalizations get l10n => AppLocalizations.of(this);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import 'package:wyatt_clean_code/core/utils/screen_util.dart';
|
||||
|
||||
extension NumX on num {
|
||||
double get w => ScreenUtil().setWidth(this);
|
||||
|
||||
double get h => ScreenUtil().setHeight(this);
|
||||
|
||||
double get sp => ScreenUtil().setSp(this);
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
import 'package:logger/logger.dart';
|
||||
import 'package:wyatt_clean_code/core/utils/wyatt_printer.dart';
|
||||
|
||||
extension ObjectX on Object {
|
||||
void log({Level level = Level.debug, String Function(Object obj)? wrap}) {
|
||||
final msg = wrap != null ? wrap(this) : this;
|
||||
WyattPrinter.get().log(level, msg);
|
||||
}
|
||||
|
||||
/// Log a message at level [Level.verbose].
|
||||
void v({String Function(Object obj)? wrap}) =>
|
||||
log(level: Level.verbose, wrap: wrap);
|
||||
|
||||
/// Log a message at level [Level.debug].
|
||||
void d({String Function(Object obj)? wrap}) => log(wrap: wrap);
|
||||
|
||||
/// Log a message at level [Level.info].
|
||||
void i({String Function(Object obj)? wrap}) =>
|
||||
log(level: Level.info, wrap: wrap);
|
||||
|
||||
/// Log a message at level [Level.warning].
|
||||
void w({String Function(Object obj)? wrap}) =>
|
||||
log(level: Level.warning, wrap: wrap);
|
||||
|
||||
/// Log a message at level [Level.error].
|
||||
void e({String Function(Object obj)? wrap}) =>
|
||||
log(level: Level.error, wrap: wrap);
|
||||
|
||||
/// Log a message at level [Level.wtf].
|
||||
void wtf({String Function(Object obj)? wrap}) =>
|
||||
log(level: Level.wtf, wrap: wrap);
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
import 'package:wyatt_clean_code/core/enums/flavor.dart';
|
||||
|
||||
class FlavorSettings {
|
||||
static FlavorSettings? _instance;
|
||||
|
||||
final Flavor flavor;
|
||||
|
||||
// Per flavor settings
|
||||
String apiKey = '';
|
||||
|
||||
/// Banner are not display in release mode, whatever this value
|
||||
bool displayBanner = true;
|
||||
|
||||
FlavorSettings._(this.flavor);
|
||||
|
||||
factory FlavorSettings.development() {
|
||||
_instance ??= FlavorSettings._(Flavor.development);
|
||||
if (_instance!.flavor != Flavor.development) {
|
||||
throw Exception('Flavor already initialized in: ${_instance!.flavor}');
|
||||
}
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
factory FlavorSettings.staging() {
|
||||
_instance ??= FlavorSettings._(Flavor.staging);
|
||||
if (_instance!.flavor != Flavor.staging) {
|
||||
throw Exception('Flavor already initialized in: ${_instance!.flavor}');
|
||||
}
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
factory FlavorSettings.production() {
|
||||
_instance ??= FlavorSettings._(Flavor.production);
|
||||
if (_instance!.flavor != Flavor.production) {
|
||||
throw Exception('Flavor already initialized in: ${_instance!.flavor}');
|
||||
}
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
/// Returns initialized [FlavorSettings], may throw if not initialized.
|
||||
static FlavorSettings get() {
|
||||
if (_instance == null) {
|
||||
throw Exception('Flavor not initialized!');
|
||||
}
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
/// To call after `WidgetsFlutterBinding.ensureInitialized()`
|
||||
///
|
||||
/// Here you can config all the settings attributes.
|
||||
static void init() {
|
||||
switch (get().flavor) {
|
||||
case Flavor.development:
|
||||
_instance!.apiKey = 'example-dev';
|
||||
break;
|
||||
case Flavor.staging:
|
||||
_instance!.apiKey = 'example-stg';
|
||||
break;
|
||||
case Flavor.production:
|
||||
_instance!.apiKey = 'example-prod';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
import 'package:wyatt_clean_code/domain/data_sources/local/base_local_data_source.dart';
|
||||
|
||||
mixin LocalDataSource<Local extends BaseLocalDataSource> {
|
||||
/// Offline data source, for debug or cache
|
||||
Local get localDataSource;
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
import 'package:wyatt_clean_code/domain/data_sources/remote/base_remote_data_source.dart';
|
||||
|
||||
mixin RemoteDataSource<Remote extends BaseRemoteDataSource> {
|
||||
/// Online data source, to provide data through API
|
||||
Remote get remoteDataSource;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:wyatt_clean_code/presentation/features/counter/counter_page.dart';
|
||||
import 'package:wyatt_clean_code/presentation/features/initial/initial_page.dart';
|
||||
|
||||
abstract class AppRouter {
|
||||
static Page<void> defaultTransition(
|
||||
BuildContext context,
|
||||
GoRouterState state,
|
||||
Widget child,
|
||||
) =>
|
||||
MaterialPage<void>(
|
||||
key: state.pageKey,
|
||||
child: child,
|
||||
);
|
||||
|
||||
static final List<GoRoute> routes = [
|
||||
GoRoute(
|
||||
name: InitialPage.pageName,
|
||||
path: '/',
|
||||
pageBuilder: (context, state) => defaultTransition(
|
||||
context,
|
||||
state,
|
||||
const InitialPage(),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/counter',
|
||||
name: CounterPage.pageName,
|
||||
pageBuilder: (context, state) => defaultTransition(
|
||||
context,
|
||||
state,
|
||||
const CounterPage(),
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:wyatt_clean_code/core/errors/exceptions.dart';
|
||||
import 'package:wyatt_type_utils/wyatt_type_utils.dart';
|
||||
|
||||
// ignore: one_member_abstracts
|
||||
abstract class UseCase<Type, Params> {
|
||||
Future<Result<Type, AppException>> call(Params params);
|
||||
}
|
||||
|
||||
class NoParams extends Equatable {
|
||||
@override
|
||||
List<Object> get props => [];
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:logger/logger.dart';
|
||||
import 'package:wyatt_clean_code/core/extensions/object_extension.dart';
|
||||
|
||||
class AppBlocObserver extends BlocObserver {
|
||||
final bool printEvent;
|
||||
final bool printError;
|
||||
final bool printChange;
|
||||
final bool printTransition;
|
||||
|
||||
final Logger logger = Logger(printer: SimplePrinter());
|
||||
|
||||
AppBlocObserver({
|
||||
this.printEvent = true,
|
||||
this.printError = true,
|
||||
this.printTransition = true,
|
||||
this.printChange = true,
|
||||
});
|
||||
|
||||
@override
|
||||
void onEvent(Bloc<dynamic, dynamic> bloc, Object? event) {
|
||||
super.onEvent(bloc, event);
|
||||
if (printEvent) {
|
||||
event?.d(wrap: (obj) => 'onEvent $event');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onError(BlocBase<dynamic> bloc, Object error, StackTrace stackTrace) {
|
||||
if (printError) {
|
||||
error.e(
|
||||
wrap: (obj) => 'onError(${bloc.runtimeType}, $obj, $stackTrace)',
|
||||
);
|
||||
}
|
||||
super.onError(bloc, error, stackTrace);
|
||||
}
|
||||
|
||||
@override
|
||||
void onChange(BlocBase<dynamic> bloc, Change<dynamic> change) {
|
||||
super.onChange(bloc, change);
|
||||
if (printChange) {
|
||||
change.d(wrap: (obj) => 'onChange(${bloc.runtimeType}, $obj)');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void onTransition(
|
||||
Bloc<dynamic, dynamic> bloc,
|
||||
Transition<dynamic, dynamic> transition,
|
||||
) {
|
||||
super.onTransition(bloc, transition);
|
||||
if (printTransition) {
|
||||
transition.d(wrap: (obj) => 'onTransition $obj');
|
||||
}
|
||||
}
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
import 'dart:ui';
|
||||
|
||||
class ScreenUtil {
|
||||
static late ScreenUtil _instance;
|
||||
static const int defaultWidth = 414;
|
||||
static const int defaultHeight = 896;
|
||||
|
||||
/// Size of the phone in UI Design ,px
|
||||
late num uiWidthPx;
|
||||
late num uiHeightPx;
|
||||
|
||||
/// allowFontScaling Specifies whether fonts should scale to respect Text
|
||||
/// Size accessibility settings. The default is false.
|
||||
late bool allowFontScaling;
|
||||
|
||||
static late double _screenWidth;
|
||||
static late double _screenHeight;
|
||||
static late double _pixelRatio;
|
||||
static late double _statusBarHeight;
|
||||
static late double _bottomBarHeight;
|
||||
static late double _textScaleFactor;
|
||||
|
||||
factory ScreenUtil() => _instance;
|
||||
|
||||
ScreenUtil._();
|
||||
|
||||
static void init({
|
||||
num width = defaultWidth,
|
||||
num height = defaultHeight,
|
||||
bool allowFontScaling = false,
|
||||
}) {
|
||||
_instance = ScreenUtil._();
|
||||
_instance.uiWidthPx = width;
|
||||
_instance.uiHeightPx = height;
|
||||
_instance.allowFontScaling = allowFontScaling;
|
||||
_pixelRatio = window.devicePixelRatio;
|
||||
_screenWidth = window.physicalSize.width;
|
||||
_screenHeight = window.physicalSize.height;
|
||||
_statusBarHeight = window.padding.top;
|
||||
_bottomBarHeight = window.padding.bottom;
|
||||
_textScaleFactor = window.textScaleFactor;
|
||||
}
|
||||
|
||||
/// The number of font pixels for each logical pixel.
|
||||
static double get textScaleFactor => _textScaleFactor;
|
||||
|
||||
/// The size of the media in logical pixels (e.g, the size of the screen).
|
||||
static double get pixelRatio => _pixelRatio;
|
||||
|
||||
/// The horizontal extent of this size.
|
||||
static double get screenWidth => _screenWidth / _pixelRatio;
|
||||
|
||||
///The vertical extent of this size. dp
|
||||
static double get screenHeight => _screenHeight / _pixelRatio;
|
||||
|
||||
/// The vertical extent of this size. px
|
||||
static double get screenWidthPx => _screenWidth;
|
||||
|
||||
/// The vertical extent of this size. px
|
||||
static double get screenHeightPx => _screenHeight;
|
||||
|
||||
/// The offset from the top
|
||||
static double get statusBarHeight => _statusBarHeight / _pixelRatio;
|
||||
|
||||
/// The offset from the top
|
||||
static double get statusBarHeightPx => _statusBarHeight;
|
||||
|
||||
/// The offset from the bottom.
|
||||
static double get bottomBarHeight => _bottomBarHeight;
|
||||
|
||||
/// The ratio of the actual dp to the design draft px
|
||||
double get scaleWidth => screenWidth / uiWidthPx;
|
||||
|
||||
double get scaleHeight =>
|
||||
(_screenHeight - _statusBarHeight - _bottomBarHeight) / uiHeightPx;
|
||||
|
||||
double get scaleText => scaleWidth;
|
||||
|
||||
/// Width function
|
||||
///
|
||||
/// Adapted to the device width of the UI Design.
|
||||
/// Height can also be adapted according to this to ensure no deformation ,
|
||||
/// if you want a square
|
||||
double setWidth(num width) => width * scaleWidth;
|
||||
|
||||
/// Height function
|
||||
///
|
||||
/// Highly adaptable to the device according to UI Design
|
||||
/// It is recommended to use this method to achieve a high degree
|
||||
/// of adaptation when it is found that one screen in the UI design
|
||||
/// does not match the current style effect, or if there is a difference
|
||||
/// in shape.
|
||||
double setHeight(num height) => height * scaleHeight;
|
||||
|
||||
/// FontSize function
|
||||
///
|
||||
/// [fontSize] The size of the font on the UI design, in px.
|
||||
/// [allowFontScaling]
|
||||
double setSp(num fontSize, {bool allowFontScalingSelf = false}) =>
|
||||
allowFontScalingSelf
|
||||
? (allowFontScalingSelf
|
||||
? (fontSize * scaleText)
|
||||
: ((fontSize * scaleText) / _textScaleFactor))
|
||||
: (allowFontScaling
|
||||
? (fontSize * scaleText)
|
||||
: ((fontSize * scaleText) / _textScaleFactor));
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:logger/logger.dart';
|
||||
|
||||
class WyattPrinter extends LogPrinter {
|
||||
WyattPrinter({this.colors = true});
|
||||
|
||||
final bool colors;
|
||||
|
||||
static Logger? _instance;
|
||||
|
||||
/// Returns [Logger] instance or create it if not.
|
||||
static Logger get({bool colors = true}) {
|
||||
_instance ??= Logger(printer: WyattPrinter(colors: colors));
|
||||
return _instance!;
|
||||
}
|
||||
|
||||
@override
|
||||
List<String> log(LogEvent event) {
|
||||
// final classNameStr = (className != null) ? '$className ' : '';
|
||||
final messageStr = _stringifyMessage(event.message);
|
||||
final errorStr = event.error != null ? 'ERROR: ${event.error}' : '';
|
||||
return ['${_labelFor(event.level)} $messageStr$errorStr'];
|
||||
}
|
||||
|
||||
String _labelFor(Level level) {
|
||||
final prefix = PrettyPrinter.levelEmojis[level]!;
|
||||
final color = PrettyPrinter.levelColors[level]!;
|
||||
|
||||
return colors ? color(prefix) : prefix;
|
||||
}
|
||||
|
||||
String _stringifyMessage(dynamic message) {
|
||||
// ignore: avoid_dynamic_calls
|
||||
final finalMessage = message is Function ? message() : message;
|
||||
if (finalMessage is Map || finalMessage is Iterable) {
|
||||
const encoder = JsonEncoder.withIndent(null);
|
||||
return encoder.convert(finalMessage);
|
||||
} else {
|
||||
return finalMessage.toString();
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
# just to keep empty folder in brick generation
|
@ -1 +0,0 @@
|
||||
# just to keep empty folder in brick generation
|
@ -1 +0,0 @@
|
||||
# just to keep empty folder in brick generation
|
@ -1,24 +0,0 @@
|
||||
import 'package:wyatt_clean_code/core/enums/exception_type.dart';
|
||||
import 'package:wyatt_clean_code/core/errors/exceptions.dart';
|
||||
import 'package:wyatt_clean_code/domain/repositories/counter_repository.dart';
|
||||
import 'package:wyatt_type_utils/wyatt_type_utils.dart';
|
||||
|
||||
class CounterRepositoryImpl implements CounterRepository {
|
||||
Result<int, AppException> _check(int value) =>
|
||||
Result.conditionalLazy<int, AppException>(
|
||||
value >= 0,
|
||||
() => value,
|
||||
() => ClientException(
|
||||
AppExceptionType.assertion,
|
||||
"Counter can't be negative!",
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
Future<Result<int, AppException>> decrement(int newState) async =>
|
||||
_check(newState);
|
||||
|
||||
@override
|
||||
Future<Result<int, AppException>> increment(int newState) async =>
|
||||
_check(newState);
|
||||
}
|
@ -1 +0,0 @@
|
||||
abstract class BaseDataSource {}
|
@ -1,3 +0,0 @@
|
||||
import 'package:wyatt_clean_code/domain/data_sources/base_data_source.dart';
|
||||
|
||||
abstract class BaseLocalDataSource extends BaseDataSource {}
|