Our great sponsors
-
Strapi
🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable and developer-first.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Within the main function, we initialize a hive box responsible for storing the value of our JWT authentication token. We then call the WidgetsFlutterBinding.ensureIntialized() function to ensure that an instance of the widget binding class is created to use our target platform channels to call native code. The function interacts with the flutter engine to achieve native platform code invocation.
The client then uses the token to access secured requests by appending the token to the request header. For each protected HTTP route, the plugin checks whether the token is valid and if it is associated with a user with the necessary access permissions. If you want to view how exactly it achieves this, you can view the source code on GitHub or by navigating within the node_modules/@strapi/plugin-users-permissions folder with the project directory.
Flutter front-end
Strapi back-end
There are additional flutter dart libraries needed to make our application. We have to install Firebase, the client-side SDK that will communicate with the Strapi back-end to display notifications and some analytics in the Firebase console. We also need an HTTP library to send HTTP requests to our Strapi server. Lastly, we need a way to persist an authenticated user’s details locally.
Related posts
- Lançamento do App Edudu
- Android 12+: Changing wallpaper or dark theme breaks Flutter and Jetpack Apps
- Android 12: Changing wallpaper or dark theme breaks Flutter and Jetpack Compose
- Reusing state logic is either too verbose or too difficult #51752
- Mastering Responsive UIs in Flutter: The Full Guide