How vonjy-2101/mvvm-flutter-project works
Project type and purpose
• This is a client-side, multi-platform Flutter application (“PostApp”) that follows an MVVM architecture.
• It consumes a remote REST API (JSONPlaceholder) to fetch posts and comments, display them, and allow users to create new ones.
File structure
• Top-level platform folders (android, ios, web) host platform projects and configs.
• lib/ contains the Flutter code, structured per MVVM:
• core/ – global configs (themes, constants, DI/service locator, logging)
• models/ – data classes (PostModel, CommentModel)
• service/api/ – network‐access layer (PostApiService, CommentApiService using Dio)
• viewmodels/ – state & presentation logic (PostListViewModel, PostDetailViewModel, NewPostViewModel, CommentPostViewModel)
• views/ – UI pages and shared widgets (post_list, post_detail, new_post, comment_post, shared)
• main.dart – app entrypoint, sets up DI, theme, routes.
• Configuration files: pubspec.yaml, analysis_options.yaml, gradle scripts, Podfile, web/manifest, etc.
Insights from README
• Confirms MVVM + Riverpod (or Provider) + Dio + dark/light theming.
• Lists core features: list posts, add post, view/add comments.
• Shows expected app layout and navigation flow.