Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build cross-platform Flutter 3 apps with Riverpod/Bloc state management, GoRouter navigation, and performance optimization.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/project-structure.md
1# Project Structure23## Feature-Based Structure45```6lib/7├── main.dart8├── app.dart9├── core/10│ ├── constants/11│ │ ├── colors.dart12│ │ └── strings.dart13│ ├── theme/14│ │ ├── app_theme.dart15│ │ └── text_styles.dart16│ ├── utils/17│ │ ├── extensions.dart18│ │ └── validators.dart19│ └── errors/20│ └── failures.dart21├── features/22│ ├── auth/23│ │ ├── data/24│ │ │ ├── repositories/25│ │ │ └── datasources/26│ │ ├── domain/27│ │ │ ├── entities/28│ │ │ └── usecases/29│ │ ├── presentation/30│ │ │ ├── screens/31│ │ │ └── widgets/32│ │ └── providers/33│ │ └── auth_provider.dart34│ └── home/35│ ├── data/36│ ├── domain/37│ ├── presentation/38│ └── providers/39├── shared/40│ ├── widgets/41│ │ ├── buttons/42│ │ ├── inputs/43│ │ └── cards/44│ ├── services/45│ │ ├── api_service.dart46│ │ └── storage_service.dart47│ └── models/48│ └── user.dart49└── routes/50└── app_router.dart51```5253## pubspec.yaml Essentials5455```yaml56dependencies:57flutter:58sdk: flutter59# State Management60flutter_riverpod: ^2.5.061riverpod_annotation: ^2.3.062# Navigation63go_router: ^14.0.064# Networking65dio: ^5.4.066# Code Generation67freezed_annotation: ^2.4.068json_annotation: ^4.8.069# Storage70shared_preferences: ^2.2.071hive_flutter: ^1.1.07273dev_dependencies:74flutter_test:75sdk: flutter76build_runner: ^2.4.077riverpod_generator: ^2.4.078freezed: ^2.5.079json_serializable: ^6.8.080flutter_lints: ^4.0.081```8283## Feature Layer Responsibilities8485| Layer | Responsibility |86|-------|----------------|87| **data/** | API calls, local storage, DTOs |88| **domain/** | Business logic, entities, use cases |89| **presentation/** | UI screens, widgets |90| **providers/** | Riverpod providers for feature |9192## Main Entry Point9394```dart95// main.dart96void main() async {97WidgetsFlutterBinding.ensureInitialized();98await Hive.initFlutter();99runApp(const ProviderScope(child: MyApp()));100}101102// app.dart103class MyApp extends ConsumerWidget {104const MyApp({super.key});105106@override107Widget build(BuildContext context, WidgetRef ref) {108final router = ref.watch(routerProvider);109110return MaterialApp.router(111routerConfig: router,112theme: AppTheme.light,113darkTheme: AppTheme.dark,114themeMode: ThemeMode.system,115);116}117}118```119