Skip to content

Commit 99fae8b

Browse files
committed
feat(template): comprehensive update with modern tools and architecture
# Core Architecture & State Management - feat(state): implement Hooks Riverpod with code generation for reactive programming • Add custom React Query-inspired hooks system (useQuery, useInfiniteQuery, useAsyncTask) • Implement provider observers for debugging state changes • Create product providers with comprehensive state management - feat(routing): replace AutoRoute with GoRouter for enhanced navigation • Add custom PopNotifier to fix state refresh issues on pop events • Implement RoutePage for consistent navigation behavior • Create router state provider for reactive routing state access # API & Data Layer - feat(api): build comprehensive API infrastructure with Dio • Implement centralized error handling via custom ApiService • Create repository pattern with clean data layer organization • Add mocked API clients for testing without backend - feat(models): add type-safe data models with freezed • Create product DTOs with serialization/deserialization • Implement proper error handling and data validation # UI Components & Screens - feat(ui): develop advanced scaffolding system • Create root scaffold with config provider for separation of concerns • Implement page scaffold with smart drawer delegation • Add proper focus and gesture management across nested navigators - feat(demo): add comprehensive demo screens showcasing key features • Create screens for components, i18n, navigation, queries and mutations • Implement infinite scrolling with both provider and query approaches • Add product card and dialog components for real-world examples # Development Environment & Tooling - feat(git): add linguist-generated attributes for generated Dart files [improve repository classification] - feat(husky): implement commit-msg and pre-commit hooks for code quality • Enforce standardized commit messages with commitlint_cli • Validate pubspec exact versioning on pre-commit • Execute lint_staged for staged files - feat(vscode): enhance developer experience with custom settings • Add recommended extensions for Dart/Flutter development • Configure i18n-ally for custom framework integration • Set file nesting patterns for generated Dart files • Adjust Dart line length to 120 characters - feat(build): configure code generation tools for assets(flutter_gen) and i18n(slang with comprehensive i18n generation options) # Documentation & Project Structure - feat(README): revamp documentation with modern template features • Update project description and badges to reflect latest supported versions • Add detailed sections for state management, routing, networking, and UI components • Include comprehensive project structure with detailed explanations • Add useful commands and tech stack resources # Platform Configuration - feat(android): modernize build system and configuration according to latest flutter updates • Switch to kotlin configuration files • Configure NDK version and Java compatibility settings • Add deep linking and intent handling in AndroidManifest.xml - feat(ios): update iOS platform configuration according to latest flutter updates • Increase minimum iOS version to 12.0 • Update XCode project settings and Pod dependencies • Add i18n config in info.plist # Internationalization & Assets - feat(i18n): implement comprehensive translation system using Slang • Replace easy_localization with type-safe Slang implementation • Add English and French translations with examples for various scenarios (pluralization, gender-specific content, rich text...) - feat(assets): implement type-safe asset access with Flutter Gen • Add demo SVG icons and example resources • Add example launcher icons and and splash screen Android and iOS configurations # Code Cleanup & Modernization - refactor(legacy): remove outdated patterns and dependencies • Replace BLoC pattern with Hooks Riverpod • Remove custom storage implementations in favor of typed providers • Clean up unused widgets and utilities - chore(deps): update all dependencies to latest versions • Ensure compatibility with Flutter 3.29+ and Dart 3.7+ This comprehensive update transforms the template into a production-ready Flutter starter with modern architecture patterns, enhanced developer tooling, and improved internationalization support. The template now provides a solid foundation for building scalable and maintainable mobile applications with industry best practices, real implementations of key patterns, working examples, and extensive documentation.
1 parent ad2a806 commit 99fae8b

File tree

155 files changed

+8046
-1134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+8046
-1134
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.g.dart linguist-generated=true
2+
*.freezed.dart linguist-generated=true
3+
*.tailor.dart linguist-generated=true
4+
*.gen.dart linguist-generated=true

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related
1416
*.iml
1517
*.ipr
1618
*.iws
1719
.idea/
20+
!/.idea/easy-i18n.xml
21+
!/.idea/codeStyles/codeStyleConfig.xml
22+
!/.idea/codeStyles/Project.xml
1823

1924
# The .vscode folder contains launch configuration and tasks you configure in
2025
# VS Code which you may wish to be included in version control, so this line
@@ -27,14 +32,10 @@ migrate_working_dir/
2732
.dart_tool/
2833
.flutter-plugins
2934
.flutter-plugins-dependencies
30-
.packages
3135
.pub-cache/
3236
.pub/
3337
/build/
3438

35-
# Web related
36-
lib/generated_plugin_registrant.dart
37-
3839
# Symbolication related
3940
app.*.symbols
4041

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
dart run commitlint_cli --edit "${1}"

.husky/pre-commit

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
# Enforce pubspec exact versioning for dependencies
5+
git diff --cached --name-only | grep -q 'pubspec.yaml' && dart run tool/validate_pubspec_versions.dart
6+
7+
# Run lint_staged
8+
dart run lint_staged

.metadata

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: cd41fdd495f6944ecd3506c21e94c6567b073278
8-
channel: stable
7+
revision: "c519ee916eaeb88923e67befb89c0f1dabfa83e6"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
17-
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
16+
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
17+
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
1818
- platform: android
19-
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
20-
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
19+
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
20+
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
2121
- platform: ios
22-
create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
23-
base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278
22+
create_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
23+
base_revision: c519ee916eaeb88923e67befb89c0f1dabfa83e6
2424

2525
# User provided section
2626

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"dart-code.dart-code",
4+
"dart-code.flutter",
5+
"robert-brunhage.flutter-riverpod-snippets",
6+
"lokalise.i18n-ally"
7+
]
8+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Language Ids that should be scanned for translations
2+
languageIds:
3+
- dart
4+
- yaml
5+
- json
6+
7+
# RegEx patterns to detect translation key usage
8+
# The {key} placeholder will be replaced with the proper keypath matching regex
9+
usageMatchRegex:
10+
# Match t.some.path and t['some.path']
11+
- "\\bt\\.({key})" # TODO: Does not work, probably because the key is no more a string
12+
- "\\bt\\[['\"`]({key})['\"`]"
13+
# Match double braces interpolation {{param}}
14+
# - "\\{\\{({key})\\}\\}"
15+
16+
# A RegEx to detect scopes from imports and usage
17+
# This matches the import of the generated translations file
18+
# scopeRangeRegex: "import.*translations\\.g\\.dart"
19+
20+
# Set to true to only use this custom framework
21+
monopoly: true
22+
23+
# Templates used when refactoring/inserting new keys
24+
refactorTemplates:
25+
- t.$1
26+
- t['$1']

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"explorer.fileNesting.patterns": {
3+
"*.dart": "${capture}.g.dart, ${capture}.freezed.dart, ${capture}.tailor.dart, ${capture}.gen.dart"
4+
},
5+
"i18n-ally.enabledFrameworks": ["custom"],
6+
"i18n-ally.annotationDelimiter": ".",
7+
"i18n-ally.keystyle": "nested",
8+
"i18n-ally.localesPaths": "assets/i18n",
9+
"i18n-ally.namespace": true,
10+
"i18n-ally.sortKeys": true,
11+
"dart.lineLength": 120,
12+
"[dart]": {
13+
"editor.rulers": [120]
14+
}
15+
}

0 commit comments

Comments
 (0)