kserko /
CineReel
A TMDB client built with Flutter using the BLoC pattern. This app is my way of learning Flutter, so take what you see here with a grain of salt
Loading repository data…
Jahidul007 / repository
This is a flutter roadmap and documentation repository. If anyone is interested you can join the party to help the community and make flutter great again.

The Data layer consists of repository and data models. Repository is where the application gather all data related to the use case, either from local sources (Local DB, cookies) or remote sources (remote API). Data from the sources, usually in json format, is parsed to Dart object called models. It’s need to be done to make sure the application knows what data and variable it’s expecting.
Domain is the inner layer which shouldn’t be susceptible to the whims of changing data sources or porting our app to Angular Dart. It will contain only the core business logic (use cases) and business objects (entities).
Repository classes act as the Data Layer and Domain Layer, each function on the repository class acts as the domain layer that specifies the use cases of the feature.
Presentation is where the UI goes. You obviously need widgets to display something on the screen. These widgets is controlled by the state using various state management design pattern used in Flutter. In this project, I use BLoC as the state management.
BLoC allows us to know exactly what data is given to the state. There is BLoC implementation that uses event classes to easily predict what state is the application in, but I use the simpler implementation of BLoC (just using streams) to shorten times for other that hasn’t been familiar to BLoC before. But I won’t dive too deep on BLoC because it’s another thing to write

import 'dart:convert';
import 'dart:io';
void main(List<String> arguments) async {
Map<String, List<String>> directoryList = {
'Data': [
'RepositoryModels',
'Repositories/LocalRepository',
'Repositories/RemoteRepository',
],
'Domain': [
'Entities',
],
'Presentation': [
'Controllers',
'Utilities',
'Widgets',
'Functions',
'Language',
'Pages',
],
};
//Add your the list of pages in your app/website
List<String> pageList = [
/*Sample List*/
"OnBoardings",
"Sign In",
"Sign Up",
"Home",
"Item List",
"Settings",
"Help",
"Chat"
];
///Creating the directories
await directoryList.forEach((key, value) async {
await directoryList[key].forEach((element) async {
await makeFile("$key/$element/export" +
"${element.replaceAll(' ', '_').toLowerCase()}.dart");
});
});
///Creating the Functions and Widgets directories in every pages
await pageList.forEach((element) async {
///Create The Page Folder
await makeFile("Presentation/Pages/" +
"${element.toLowerCase()}/${element.replaceAll(' ', '_').toLowerCase()}Page.dart");
///Create The Page's Functions Folder
await makeFile(
"Presentation/Pages/${element.toLowerCase()}/Functions/${element.replaceAll(' ', '_').toLowerCase()}Functions.dart");
///Create The Page's Widgets Folder
await makeFile(
"Presentation/Pages/${element.toLowerCase()}/Widgets/${element.replaceAll(' ', '_').toLowerCase()}Widgets.dart");
///Add The page in the export file
await File("Presentation/Pages/exportpages.dart").writeAsStringSync(
"export '${element.toLowerCase()}/${element.replaceAll(' ', '_').toLowerCase()}Page.dart';\n",
mode: FileMode.append,
);
});
// print("Export Pages:\n" + exportPages);
}
makeDir(String s) async {
var dir = await Directory(s).create(recursive: true);
// print(dir.path);
}
makeFile(String s) async {
var dir = await File(s).create(recursive: true);
// print(dir.path);
}
├── lib
| ├── posts
│ │ ├── bloc
│ │ │ └── post_bloc.dart
| | | └── post_event.dart
| | | └── post_state.dart
| | └── models
| | | └── models.dart*
| | | └── post.dart
│ │ └── view
│ │ | ├── posts_page.dart
│ │ | └── posts_list.dart
| | | └── view.dart*
| | └── widgets
| | | └── bottom_loader.dart
| | | └── post_list_item.dart
| | | └── widgets.dart*
│ │ ├── posts.dart*
│ ├── app.dart
│ ├── simple_bloc_observer.dart
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
The application uses a feature-driven directory structure. This project structure enables us to scale the project by having self-contained features. In this example we will only have a single feature (the post feature) and it's split up into respective folders with barrel files, indicated by the asterisk (*).
It basically consists of three layers where the View which consists of all UI elements you see on the screen. It can also contain logic that only concerns the UI. The Model contains your business logic and backend connections. The ViewModel is the glue between both in that it processes and transforms data from the Model to a form the View can easily display. It offers functions (often called Commands) the View can call to trigger actions on the Model and provides events to signal the View about data changes.
Important: The ViewModel knows nothing about the View which makes it testable and more than one View can use the same ViewModel. A ViewModel just offers services to the View (events, commands). The _View decides which it uses.
"Several MVVM frameworks encapsulate the subscription of events and calling functions to update data in the ViewModel from the View using DataBindings"
To trigger any other action in the View besides data updates from the ViewModel gets tedious because you have to publish events and functions if the View should be able to retrieve data as a result of the event.
Another problem is that we always moving state between the different layers which have to be kept in sync.
What we really want is an App that just reacts on any event from the outside without having to deal with state management all the time.

onClick:(){
removeItem(index);
}
void removeItem(index) {
setState(() {
groupData.removeAt(index);
});
}
N.B: Must be followed stateful widget.
void onReorder(int oldIndex, int newIndex) {
if (newIndex > oldIndex) {
newIndex -= 1;
}
setState(() {
String game = topTenGames[oldIndex];
topTenGames.removeAt(oldIndex);
topTenGames.insert(newIndex, game);
});
}
var date = "2021-03-24T08:57:47.812"
var dateTime = DateTime.parse("${date.substring(0,16)}");
var stdTime = DateFormat('MMM d, yy hh:mm a').format(dateTime).toString();
var dateFormat = DateFormat("dd-MM-yyyy hh:mm aa"); // you can change the format here
var utcDate = dateFormat.format(DateTime.parse(uTCTime)); // pass the UTC time here
var localDate = dateFormat.parse(utcDate, true).toLocal().toString();
String createdDate = dateFormat.format(DateTime.parse(localDate));
List<String> _options = [
'Arts & entertainment',
'Biographies & memoirs',
];
List<bool> _isOptionSelected = [
false,
false,
];
Map<String, dynamic> map = _options.asMap().map((key,value)=>MapEntry(value,{
'optionName':value,
'isOptionSelected':_isOptionSelected[key]
}));
List<String> _options = [];
List<bool> _isOptionSelected = [];
Map<String, Map<String, dynamic>> _isOptionMap = {
'Arts & entertainment': {
'optionName': 'Arts & entertainment',
'isOptionSelected': false,
},
'Biographies & memoirs': {
'optionName': 'Biographies & memoirs',
'isOptionSelected': false,
},
};
_isOptionMap.forEach((key, value) {
_options.add(value['optionName']);
_isOptionSelected.add(value['isOptionSelected']);
});
print(_options);
print(_isOptionSelected);
TextEditingController _controller = new TextEditingController();
String text = ""; // empty string to carry what was there before it
onChanged
int maxLength = ...
...
new TextField(
controller: _controller,
onChange: (String newVal) {
if(newVal.length <= maxLength){
text = newVal;
}else{
_controller.value = new TextEditingValue(
text: text,
selection: new TextSelection(
baseOffset: maxLength,
extentOffset: maxLength,
affinity: TextAffinity.downstream,
isDirectional: false
),
composing: new TextRange(
start: 0, end: maxLength
)
);
_contr
Selected from shared topics, language and repository description—not editorial ratings.
kserko /
A TMDB client built with Flutter using the BLoC pattern. This app is my way of learning Flutter, so take what you see here with a grain of salt
devaryakjha /
This is a work-in-progress music streaming application built with Flutter for iOS, Android and macOs (Beta). The app is designed to have all the basic functionalities of a music app, with a UI heavily inspired by the Spotify mobile app.
MohanedZekry /
This is an example project to show what Clean Architecture would look like (in Flutter)
aymansalkhatib /
Notes App 📓 is a mobile application designed to help users efficiently create, manage, and organize their notes 📋. Developed as part of a training course 🎓, this app features a clean and user-friendly interface for effective note-taking 📝✨. It serves as an educational project to demonstrate practical skills in mobile app development 📱🚀.
aymansalkhatib /
This project is a Movies App built using Flutter, following the principles of Clean Architecture. The app allows users to browse, search, and view details of various movies. It is designed to be scalable, maintainable, and efficient.
SharjeelMoqrabKhan /
Flutter is a mobile framework by Google for building beautiful and fast native apps. Flutter is very productive and offers a rich set of widgets that makes building apps a breeze. Once you experience hot-reload and everything else Flutter has to offer, you will never want to go back. In this course you will build a complete, real-world application for iOS and Android, by using Dart, Flutter and Firebase. This course starts from the basics, and includes a full introduction to Dart and Flutter. This means that NO prior experience with Dart and mobile app development is needed. As you make progress, the course will introduce more advanced topics, with special emphasis on writing production-ready code, so that you can learn how to build robust applications that scale. And by learning Firebase as well, you will understand how to make modern reactive apps, and see why Flutter and Firebase are a great combination. Important concepts are explained with clear diagrams. You will always learn what you will be building and why, and then how to do it. This will give you a strong foundation, and the techniques you learn here will be valuable in your own Flutter apps. So by the end of this course you will be a competent Flutter developer. Course Structure This is a complete course. With 21 hours of content, it will teach you everything you need to know about Flutter. - Each lesson builds on top of the previous one (source code included). - Each section covers a different topic. You can follow the course from beginning to end, or choose the topics you’re most interested in. Fast-track your learning This course offers a lot of practical advice, along with tips and techniques that I have battle-tested over years of experience. It goes far beyond "making things work", and gives you a very solid understanding of many different techniques and their trade-offs. And it will show you how to think about problems and their solutions, with the mindset of a top professional software engineer. So taking this course will save you a lot of time and money, and will prepare you for building real-world apps. And if you get stuck, you can ask questions and they will be quickly answered. Included in this course Introduction to Dart Setup instructions for macOS and Windows Introduction to Flutter and widgets Building layouts with Material & Cupertino widgets + build your own custom widgets Navigation Firebase Authentication (anonymous, email & password, Google, Facebook) State Management: how to use setState, lifting state up via callbacks, global access, scoped access with Provider, BLoCs, ValueNotifier & ChangeNotifier Streams, building reactive apps & advanced stream operations with RxDart Forms, input handling and validation Managing and updating packages Databases and Cloud Firestore Working with Forms and Cloud Firestore Working with ListViews and multiple UI states Date & time pickers Unit & Widget tests with mockito (basics to advanced) System requirements Windows, macOS or Linux for Android app development macOS for iOS app development