mvvm_generator 1.0.3
mvvm_generator: ^1.0.3 copied to clipboard
Dart CLI tool to generate Flutter MVVM structure (View, Cubit, Model, Repository, and API).
mvvm_generator ๐ง #
ุฃุฏุงุฉ Dart CLI ูุชูููุฏ ู ููุงุช Flutter ุจูู ุท MVVM ุจุณูููุฉุ ุชุดู ู:
โ
ู
ููุงุช View ู Widget
โ
ู
ููุงุช Cubit ู State ู Model
โ
ุฏุนู
Repository ู DataSource
โ
ุชูููุฏ ู
ููุงุช API (Dio, Endpoints, Manager)
๐ ุงูุชุซุจูุช #
ูุชุซุจูุช ุงูุฃุฏุงุฉ ุจุดูู ุนุงูู ู:
dart pub global activate mvvm_generator
๐ ู
ูุงุญุธุฉ ู
ูู
ุฉ:
ูู ุธูุฑุช ูู ุฑุณุงูุฉ ู
ุซู:
Pub installs executables into C:\Users\USERNAME\AppData\Local\Pub\Cache\bin, which is not on your path.
โช๏ธ ุฃุถู ูุฐุง ุงูู
ุณุงุฑ ุฅูู PATH ูุฏูููุง:
Windows:
C:\Users\USERNAME\AppData\Local\Pub\Cache\bin
macOS / Linux:
export PATH="$PATH":"$HOME/.pub-cache/bin"
โ๏ธ ุงูุฃูุงู
ุฑ ุงูู
ุชุงุญุฉ
1๏ธโฃ mvvm_page
โถ ูุชูููุฏ ุตูุญุฉ MVVM ุนุงุฏูุฉ (View + Widget + Cubit + State + Model):
mvvm_page home_page
ููุชุฌ:
lib/feature/home_page/
โโโ presentation/
โ โโโ view/home_page_view.dart
โ โโโ widget/home_page_widget.dart
โโโ data/
โ โโโ cubit/home_page_cubit.dart
โ โโโ cubit/home_page_state.dart
โ โโโ model/home_page_model.dart
2๏ธโฃ mvvm_page_repo
โถ ูุชูููุฏ ุตูุญุฉ ูุงู
ูุฉ ู
ุน Repository ู DataSource:
mvvm_page_repo students_page
ููุชุฌ:
lib/feature/students_page/
โโโ presentation/
โ โโโ view/students_page_view.dart
โ โโโ widget/students_page_widget.dart
โโโ data/
โ โโโ cubit/students_page_cubit.dart
โ โโโ cubit/students_page_state.dart
โ โโโ model/students_page_model.dart
โ โโโ repository/students_page_repository.dart
โ โโโ datasource/students_page_datasource.dart
3๏ธโฃ mvvm_core_api
โถ ูุชูููุฏ ู
ููุงุช API ุงูุฃุณุงุณูุฉ:
mvvm_core_api
ููุชุฌ:
lib/core/api/
โโโ api_constant.dart
โโโ api_endpoint.dart
โโโ api_manager.dart
โ ๏ธ ุชุฃูุฏ ู
ู ุฅุถุงูุฉ ู
ูุชุจุฉ Dio ุฅูู ู
ุดุฑูุนู:
dart pub add dio
๐งช ู
ุซุงู ุงุณุชุฎุฏุงู
ุณุฑูุน:
mvvm_page_repo profile
๐ ุงูุชุฑุฎูุต
MIT License ยฉ 2025 Mohamed Zebib