first_ally_demo
a flutter app demo challenge for first ally.
a brief preview
walk through | adding account | converting currency |
---|---|---|
getting started
test cards
card number: 5078 5078 5078 5078 12 (verve)
expiry date: any date in the future
cvv: 081
pin: 1111
details of the project structure explained below
- /app
#this is where all the application’s directories are contained.- /core
- /theme
#here i created themes for my text widgets. - /utils
#here you can i kept basic dart files (which are not necessarily widgets or models)
that run repetitive operations or tasks.
- /theme
- /data
# this directory is responsible for containing everything related to app data like models
and providers.- /providers
# main data providers are contained here for api calls and shared preferences
- /models
# here you’d find data classes, or data models responsible for abstracting objects.
- /modules
# each module is a collection of related widgets which presents a unique feature
or provides a unique experience to the user.
each module consists of a page,
its respective getxcontroller and its custom widgets and in some cases its repository.here’s an example
- /account_module
- account_screen.dart
- controller.dart
- repository.dart
- /widgetsthe user interface design is kept in the screens with some level of abstraction,
thus the widgets which houses some reusable custom widgets which are used for the
respective module alone.the controller is where all the respective user logic and interactions are handled and
controlled, every controller is initialized on app run by the “p.dart in app/core” which also
provides a global access interface to all controllers.
- /account_module
- /global_widgets
widgets that can be reused by multiple modules.
- /services
this is where all app services are stored.
- /core
- /routes
#in this repository i deposited all routes and pages. they’re separated into two files,
and two classes, one being routes.dart, containing its constant routes and the other
for routing.- routes.dart
this file contains all route constants ex:
class routes { const home = ‘/ home’; } - pages.dart
this file contains the array routing ex :
class apppages { static final pages = [
getpage(name: routes.home, page:()=> homepage())
]};
- routes.dart
- main.dart
#main application file
Comments are closed.