Flut Cinematic is your perfect companion for exploring the fascinating world of cinema. With an intuitive interface and innovative features, Flut Cinematic offers you an unparalleled cinematic experience in the palm of your hand.
-
Explore Movies: Dive into a vast collection of movies spanning all genres. From timeless classics to the latest blockbuster releases, FlutCinematic has something for every cinephile.
-
Discover Details: Get detailed information about each movie, including synopsis, cast, user and critic ratings, trailers, and more. Never miss any important details.
-
Advanced Internationalization System: FlutCinematic utilizes an advanced internationalization (i18n) system that allows you to enjoy the app in multiple languages. Easily switch between English and Spanish for a fully tailored experience.
-
Authentication: Utilize a secure authentication system that triggers authentication prompts specifically when a user initiates a purchase transaction. This ensures that authentication seamlessly integrates into the purchase process while remaining unobtrusive during other interactions with the application.
-
Trailer: Users can access movie trailers.
-
Date and Time Selection: Users can choose the date and time of their movie screening according to their convenience.
-
Seat Selection: Users can select specific seats they wish to reserve for the movie screening.
-
Constant Updates: Stay up-to-date with the latest news from the world of cinema, content updates, and new features added regularly to the app.
First, create the file
launch.json
in the.vscode
folder following the examplelaunch.json.example
, and add the values of thedart-define (Environment variables)
in thetoolArgs
parameter.
Now you must execute the following commands to obtain the packages and generate the necessary code:
flutter pub get
dart run build_runner build --delete-conflicting-outputs
dart run slang
cd packages
cd flut_cinematic_api_client
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ..
cd flut_cinematic_common
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd ..
cd flut_cinematic_data
flutter pub get
cd ..
cd flut_cinematic_domain
flutter pub get
dart run build_runner build --delete-conflicting-outputs
cd flut_cinematic_firebase
flutter pub get
cd ..
cd flut_cinematic_ui
flutter pub get
This project contains 3 flavors:
- development
- staging
- production
Can you add Environment variables
for all flavors,
To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:
# Development
$ flutter run --flavor development --target lib/main_development.dart
# Staging
$ flutter run --flavor staging --target lib/main_staging.dart
# Production
$ flutter run --flavor production --target lib/main_production.dart
*Flut Cinematic works on iOS, Android.
This project relies on slang type-safe i18n solution using JSON files.
- To add a new localizable strings, open the
myFeatureName.json
file atlib/i18n/en/myFeatureName.json
.
{
"appName": "Flut Cinematic"
}
- Then add a new key/value and description
{
"appName": "Flut Cinematic"
}
- Use the new string
import 'package:flut_cinematic/i18n/translations.g.dart';
@override
Widget build(BuildContext context) {
return Text(texts.misc.appName);
}
Update the CFBundleLocalizations
array in the Info.plist
at ios/Runner/Info.plist
to include the new locale.
...
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>es</string>
</array>
...
- For each supported locale, add a new Json file in
lib/i18n
.
βββ i18n
β βββ en
β β βββ misc.json
β β βββ myFeature.json
β βββ es
β β βββ misc.json
β β βββ myFeature.json
- Add the translated strings to each
.json
file:
IMPORTANT: slang does not support _ or - for file names. You must use camelcase. Example
myFeatureName.json
i18n/en/myFeatureName.json
{
"appName": "Flut Cinematic",
"movie": "Movie"
}
i18n/es/myFeatureName.json
{
"appName": "Flut Cinematic",
"movie": "PelΓcula"
}
To use the latest translations changes, you will need to generate them:
dart run slang