Jonny Borges
Committed by GitHub

Added Benchmarks

Showing 93 changed files with 2861 additions and 1219 deletions
1 -![](get.png)  
2 -  
3 -*Languages: [English](README.md), [Brazilian Portuguese](README.pt-br.md).*  
4 -  
5 -[![pub package](https://img.shields.io/pub/v/get.svg?label=get&color=blue)](https://pub.dev/packages/get)  
6 -![building](https://github.com/jonataslaw/get/workflows/Test,%20build%20and%20deploy/badge.svg)  
7 -[![Gitter](https://badges.gitter.im/flutter_get/community.svg)](https://gitter.im/flutter_get/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)  
8 -<a href="https://github.com/Solido/awesome-flutter">  
9 - <img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square" />  
10 -</a>  
11 -<a href="https://www.buymeacoffee.com/jonataslaw" target="_blank"><img src="https://i.imgur.com/aV6DDA7.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important; box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" > </a>  
12 -<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->  
13 -[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)  
14 -<!-- ALL-CONTRIBUTORS-BADGE:END -->  
15 -  
16 -  
17 -- Get is an extra-light and powerful solution for Flutter. It combines high performance state management, intelligent dependency injection, and route management in a quick and practical way.  
18 -- Get is not for everyone, its focus is (performance) on the minimum consumption of resources, (productivity) using an easy and pleasant syntax and (organization) allowing the total decoupling of the View from the business logic.  
19 -- Get will save hours of development, and will extract the maximum performance that your application can deliver, being easy for beginners, and accurate for experts. Navigate without context, open dialogs, snackbars or bottomsheets from anywhere in your code, Manage states and inject dependencies in an easy and practical way. Get is secure, stable, up-to-date, and offers a huge range of APIs that are not present on default framework.  
20 -  
21 -  
22 -**The "counter" project created by default on new project on Flutter has over 100 lines (with comments). To show the power of Get, I will demonstrate how to make a "counter" changing the state with each click, switching between pages and sharing the state between screens, all in an organized way, separating the business logic from the view, in ONLY 26 LINES CODE INCLUDING COMMENTS.**  
23 -  
24 -```dart  
25 -void main() => runApp(GetMaterialApp(home: Home()));  
26 -// Create your business logic class and place all variables, methods and controllers inside it.  
27 -class Controller extends RxController{  
28 - // ".obs" turns any object into an observable one.  
29 - var count = 0.obs;  
30 - increment() => count.value++;  
31 -}  
32 -  
33 -class Home extends StatelessWidget {  
34 - // Instantiate your class using Get.put() to make it available for all "child" routes there.  
35 - final Controller c = Get.put(Controller());  
36 - @override  
37 - Widget build(context) => Scaffold(  
38 - appBar:  
39 - AppBar(title: Obx(() => Text("Total of clicks: " + c.count.string))),  
40 - // Replace the 8 lines Navigator.push by a simple Get.to(). You don't need context  
41 - body: Center(child: RaisedButton(  
42 - child: Text("Go to Other"), onPressed: () => Get.to(Other()))),  
43 - floatingActionButton:  
44 - FloatingActionButton(child: Icon(Icons.add), onPressed: c.increment));  
45 -}  
46 -  
47 -class Other extends StatelessWidget {  
48 - // You can ask Get to find a Controller that is being used by another page and redirect you to it.  
49 - final Controller c = Get.find();  
50 - @override  
51 - Widget build(context) => Scaffold(body: Center(child: Text(c.count.string)));  
52 -}  
53 -  
54 -```  
55 -  
56 -This is a simple project but it already makes clear how powerful Get is. As your project grows, this difference will become more significant. Get was designed to work with teams, but it makes the job of an individual developer simple. Improve your deadlines, deliver everything on time without losing performance. Get is not for everyone, but if you identified with that phrase, Get is for you!  
57 -  
58 -- [How to use?](#how-to-use)  
59 -- [Navigating without named routes](#navigating-without-named-routes)  
60 - - [SnackBars](#snackbars)  
61 - - [Dialogs](#dialogs)  
62 - - [BottomSheets](#bottomsheets)  
63 -- [Simple State Manager](#simple-state-manager)  
64 - - [Simple state manager usage](#simple-state-manager-usage)  
65 - - [No StatefulWidget:](#no-statefulwidget)  
66 - - [Forms of use:](#forms-of-use)  
67 -- [Reactive State Manager](#reactive-state-manager)  
68 - - [GetX vs GetBuilder vs Obx vs MixinBuilder](#getx-vs-getbuilder-vs-obx-vs-mixinbuilder)  
69 -- [Simple Instance Manager](#simple-instance-manager)  
70 -- [Bindings](#bindings)  
71 - - [To use this API you only need:](#to-use-this-api-you-only-need)  
72 -- [Workers:](#workers)  
73 -- [Navigate with named routes:](#navigate-with-named-routes)  
74 - - [Send data to named Routes:](#send-data-to-named-routes)  
75 - - [Dynamic urls links](#dynamic-urls-links)  
76 - - [Middleware](#middleware)  
77 - - [Change Theme](#change-theme)  
78 - - [Optional Global Settings](#optional-global-settings)  
79 - - [Nested Navigators](#nested-navigators)  
80 - - [Other Advanced APIs and Manual configurations](#other-advanced-apis-and-manual-configurations)  
81 -  
82 -#### Want to contribute to the project? We will be proud to highlight you as one of our collaborators. Here are some points where you can contribute and make Get (and Flutter) even better.  
83 -  
84 -- Helping to translate the readme into other languages.  
85 -- Adding documentation to the readme (not even half of Get's functions have been documented yet).  
86 -- Write articles or make videos teaching how to use Get (they will be inserted in the Readme and in the future in our Wiki).  
87 -- Offering PRs for code/tests.  
88 -- Including new functions.  
89 -  
90 -Any contribution is welcome!  
91 -  
92 -## How to use?  
93 -  
94 -<!-- - Flutter Master/Dev/Beta: version 2.0.x-dev  
95 -- Flutter Stable branch: version 2.0.x  
96 -(look for latest version on pub.dev) -->  
97 -  
98 -Add this to your pubspec.yaml file:  
99 -  
100 -```  
101 -dependencies:  
102 - get:  
103 -```  
104 -If you are going to use routes/snackbars/dialogs/bottomsheets without context, or use the high-level Get APIs, you need to simply add "Get" before your MaterialApp, turning it into GetMaterialApp and enjoy!  
105 -  
106 -```dart  
107 -GetMaterialApp( // Before: MaterialApp(  
108 - home: MyHome(),  
109 -)  
110 -```  
111 -## Navigating without named routes  
112 -To navigate to a new screen:  
113 -  
114 -```dart  
115 -Get.to(NextScreen());  
116 -```  
117 -  
118 -To close snackbars, dialogs, bottomsheets, or anything you would normally close with Navigator.pop(context);  
119 -  
120 -```dart  
121 -Get.back();  
122 -```  
123 -  
124 -To go to the next screen and no option to go back to the previous screen (for use in SplashScreens, login screens and etc.)  
125 -  
126 -```dart  
127 -Get.off(NextScreen());  
128 -```  
129 -  
130 -To go to the next screen and cancel all previous routes (useful in shopping carts, polls, and tests)  
131 -  
132 -```dart  
133 -Get.offAll(NextScreen());  
134 -```  
135 -  
136 -To navigate to the next route, and receive or update data as soon as you return from it:  
137 -```dart  
138 -var data = await Get.to(Payment());  
139 -```  
140 -on other screen, send a data for previous route:  
141 -  
142 -```dart  
143 -Get.back(result: 'success');  
144 -```  
145 -And use it:  
146 -  
147 -ex:  
148 -```dart  
149 -if(data == 'success') madeAnything();  
150 -```  
151 -  
152 -Don't you want to learn our syntax?  
153 -Just change the Navigator (uppercase) to navigator (lowercase), and you will have all the functions of the standard navigation, without having to use context  
154 -Example:  
155 -  
156 -```dart  
157 -  
158 -// Default Flutter navigator  
159 -Navigator.of(context).push(  
160 - context,  
161 - MaterialPageRoute(  
162 - builder: (BuildContext context) {  
163 - return HomePage();  
164 - },  
165 - ),  
166 -);  
167 -  
168 -// Get using Flutter syntax without needing context  
169 -navigator.push(  
170 - MaterialPageRoute(  
171 - builder: (_) {  
172 - return HomePage();  
173 - },  
174 - ),  
175 -);  
176 -  
177 -// Get syntax (It is much better, but you have the right to disagree)  
178 -Get.to(HomePage());  
179 -  
180 -  
181 -```  
182 -  
183 -### SnackBars  
184 -  
185 -To have a simple SnackBar with Flutter, you must get the context of Scaffold, or you must use a GlobalKey attached to your Scaffold,  
186 -```dart  
187 -final snackBar = SnackBar(  
188 - content: Text('Hi!'),  
189 - action: SnackBarAction(  
190 - label: 'I am a old and ugly snackbar :(',  
191 - onPressed: (){}  
192 - ),  
193 -);  
194 -// Find the Scaffold in the widget tree and use  
195 -// it to show a SnackBar.  
196 -Scaffold.of(context).showSnackBar(snackBar);  
197 -```  
198 -  
199 -With Get:  
200 -  
201 -```dart  
202 -Get.snackbar('Hi', 'i am a modern snackbar');  
203 -```  
204 -  
205 -With Get, all you have to do is call your Get.snackbar from anywhere in your code or customize it however you want!  
206 -  
207 -```dart  
208 -Get.snackbar(  
209 - "Hey i'm a Get SnackBar!", // title  
210 - "It's unbelievable! I'm using SnackBar without context, without boilerplate, without Scaffold, it is something truly amazing!", // message  
211 - icon: Icon(Icons.alarm),  
212 - shouldIconPulse: true,  
213 - onTap:(){},  
214 - barBlur: 20,  
215 - isDismissible: true,  
216 - duration: Duration(seconds: 3),  
217 -);  
218 -  
219 -  
220 - ////////// ALL FEATURES //////////  
221 - // Color colorText,  
222 - // Duration duration,  
223 - // SnackPosition snackPosition,  
224 - // Widget titleText,  
225 - // Widget messageText,  
226 - // bool instantInit,  
227 - // Widget icon,  
228 - // bool shouldIconPulse,  
229 - // double maxWidth,  
230 - // EdgeInsets margin,  
231 - // EdgeInsets padding,  
232 - // double borderRadius,  
233 - // Color borderColor,  
234 - // double borderWidth,  
235 - // Color backgroundColor,  
236 - // Color leftBarIndicatorColor,  
237 - // List<BoxShadow> boxShadows,  
238 - // Gradient backgroundGradient,  
239 - // FlatButton mainButton,  
240 - // OnTap onTap,  
241 - // bool isDismissible,  
242 - // bool showProgressIndicator,  
243 - // AnimationController progressIndicatorController,  
244 - // Color progressIndicatorBackgroundColor,  
245 - // Animation<Color> progressIndicatorValueColor,  
246 - // SnackStyle snackStyle,  
247 - // Curve forwardAnimationCurve,  
248 - // Curve reverseAnimationCurve,  
249 - // Duration animationDuration,  
250 - // double barBlur,  
251 - // double overlayBlur,  
252 - // Color overlayColor,  
253 - // Form userInputForm  
254 - ///////////////////////////////////  
255 -```  
256 -If you prefer the traditional snackbar, or want to customize it from scratch, including adding just one line (Get.snackbar makes use of a mandatory title and message), you can use  
257 -`Get.rawSnackbar();` which provides the RAW API on which Get.snackbar was built.  
258 -  
259 -### Dialogs  
260 -  
261 -To open dialog:  
262 -  
263 -```dart  
264 -Get.dialog(YourDialogWidget());  
265 -```  
266 -  
267 -To open default dialog:  
268 -  
269 -```dart  
270 -Get.defaultDialog(  
271 - onConfirm: () => print("Ok"),  
272 - middleText: "Dialog made in 3 lines of code"  
273 -);  
274 -```  
275 -You can also use Get.generalDialog instead of showGeneralDialog.  
276 -  
277 -For all other Flutter dialog widgets, including cupertinos, you can use Get.overlayContext instead of context, and open it anywhere in your code.  
278 -For widgets that don't use Overlay, you can use Get.context.  
279 -These two contexts will work in 99% of cases to replace the context of your UI, except for cases where inheritedWidget is used without a navigation context.  
280 -  
281 -### BottomSheets  
282 -Get.bottomSheet is like showModalBottomSheet, but don't need of context.  
283 -  
284 -```dart  
285 -Get.bottomSheet(  
286 - Container(  
287 - child: Wrap(  
288 - children: <Widget>[  
289 - ListTile(  
290 - leading: Icon(Icons.music_note),  
291 - title: Text('Music'),  
292 - onTap: () => {}  
293 - ),  
294 - ListTile(  
295 - leading: Icon(Icons.videocam),  
296 - title: Text('Video'),  
297 - onTap: () => {},  
298 - ),  
299 - ],  
300 - ),  
301 - );  
302 -);  
303 -```  
304 -  
305 -## Simple State Manager  
306 -There are currently several state managers for Flutter. However, most of them involve using ChangeNotifier to update widgets and this is a bad and very bad approach to performance of medium or large applications. You can check in the official Flutter documentation that ChangeNotifier should be used with 1 or a maximum of 2 listeners (https://api.flutter.dev/flutter/foundation/ChangeNotifier-class.html), making it practically unusable for any application medium or large. Other state managers are good, but have their nuances. BLoC is very safe and efficient, but it is very complex for beginners, which has kept people from developing with Flutter. MobX is easier than BLoC and reactive, almost perfect, I would say, but you need to use a code generator that for large applications, reduces productivity, you will need to drink a lot of coffees until your code is ready again after a Flutter clean (And this is not MobX's fault, but the codegen which is really slow!). Provider uses InheritedWidget to deliver the same listener, as a way of solving the problem reported above with ChangeNotifier, which implies that any access to its ChangeNotifier class must be within the widget tree because of the context to access o Inherited.  
307 -  
308 -Get isn't better or worse than any other state manager, but that you should analyze these points as well as the points below to choose between using Get in pure form (Vanilla), or using it in conjunction with another state manager. Definitely, Get is not the enemy of any other state manager, because Get is a microframework, not just a state manager, and can be used either alone or in conjunction with them.  
309 -  
310 -Get has a state manager that is extremely light and easy (written in just 95 lines of code), which does not use ChangeNotifier, will meet the need especially for those new to Flutter, and will not cause problems for large applications.  
311 -  
312 -What performance improvements does Get bring?  
313 -  
314 -1- Update only the required widget.  
315 -  
316 -2- Does not use changeNotifier, it is the state manager that uses less memory (close to 0mb for until).  
317 -  
318 -3- Forget StatefulWidget! With Get you will never need it. With the other state managers, you will probably have to use a StatefulWidget to get the instance of your Provider, BLoC, MobX Controller, etc. But have you ever stopped to think that your appBar, your scaffold, and most of the widgets that are in your class are stateless? So why save the state of an entire class, if you can only save the state of the Widget that is stateful? Get solves that, too. Create a Stateless class, make everything stateless. If you need to update a single component, wrap it with GetBuilder, and its state will be maintained.  
319 -  
320 -4- Organize your project for real! Controllers must not be in your UI, place your TextEditController, or any controller you use within your Controller class.  
321 -  
322 -5- Do you need to trigger an event to update a widget as soon as it is rendered? GetBuilder has the property "initState", just like StatefulWidget, and you can call events from your controller, directly from it, no more events being placed in your initState.  
323 -  
324 -6- Do you need to trigger an action like closing streams, timers and etc? GetBuilder also has the dispose property, where you can call events as soon as that widget is destroyed.  
325 -  
326 -7- Use streams only if necessary. You can use your StreamControllers inside your controller normally, and use StreamBuilder also normally, but remember, a stream reasonably consumes memory, reactive programming is beautiful, but you shouldn't abuse it. 30 streams open simultaneously can be worse than changeNotifier (and changeNotifier is very bad).  
327 -  
328 -8- Update widgets without spending ram for that. Get stores only the GetBuilder creator ID, and updates that GetBuilder when necessary. The memory consumption of the get ID storage in memory is very low even for thousands of GetBuilders. When you create a new GetBuilder, you are actually sharing the state of GetBuilder that has a creator ID. A new state is not created for each GetBuilder, which saves A LOT OF ram for large applications. Basically your application will be entirely Stateless, and the few Widgets that will be Stateful (within GetBuilder) will have a single state, and therefore updating one will update them all. The state is just one.  
329 -  
330 -9- Get is omniscient and in most cases it knows exactly the time to take a controller out of memory. You should not worry about when to dispose of a controller, Get knows the best time to do this. Example:  
331 -  
332 -- Class a => Class B (has controller X) => Class C (has controller X)  
333 -  
334 -In class A the controller is not yet in memory, because you have not used it yet (Get is lazyLoad). In class B you used the controller, and it entered memory. In class C you used the same controller as in class B, Get will share the state of controller B with controller C, and the same controller is still in memory. If you close screen C and screen B, Get will automatically take controller X out of memory and free up resources, because Class a is not using the controller. If you navigate to B again, controller X will enter memory again, if instead of going to class C, you return to class A again, Get will take the controller out of memory in the same way. If class C didn't use the controller, and you took class B out of memory, no class would be using controller X and likewise it would be disposed of. The only exception that can mess with Get, is if you remove B from the route unexpectedly, and try to use the controller in C. In this case, the creator ID of the controller that was in B was deleted, and Get was programmed to remove it from memory every controller that has no creator ID. If you intend to do this, add the "autoRemove: false" flag to class B's GetBuilder and use adoptID = true; in class C's GetBuilder.  
335 -  
336 -### Simple state manager usage  
337 -  
338 -```dart  
339 -// Create controller class and extends GetController  
340 -class Controller extends GetController {  
341 - int counter = 0;  
342 - void increment() {  
343 - counter++;  
344 - update(); // use update() to update counter variable on UI when increment be called  
345 - }  
346 -}  
347 -// On your Stateless/Stateful class, use GetBuilder to update Text when increment be called  
348 -GetBuilder<Controller>(  
349 - init: Controller(), // INIT IT ONLY THE FIRST TIME  
350 - builder: (_) => Text(  
351 - '${_.counter}',  
352 - ),  
353 -)  
354 -//Initialize your controller only the first time. The second time you are using ReBuilder for the same controller, do not use it again. Your controller will be automatically removed from memory as soon as the widget that marked it as 'init' is deployed. You don't have to worry about that, Get will do it automatically, just make sure you don't start the same controller twice.  
355 -```  
356 -**Done!**  
357 -- You have already learned how to manage states with Get.  
358 -  
359 -- Note: You may want a larger organization, and not use the init property. For that, you can create a class and extends Bindings class, and within it mention the controllers that will be created within that route. Controllers will not be created at that time, on the contrary, this is just a statement, so that the first time you use a Controller, Get will know where to look. Get will remain lazyLoad, and will continue to dispose Controllers when they are no longer needed. See the pub.dev example to see how it works.  
360 -  
361 -  
362 -If you navigate many routes and need data that was in your previously used controller, you just need to use GetBuilder Again (with no init):  
363 -  
364 -```dart  
365 -class OtherClass extends StatelessWidget {  
366 - @override  
367 - Widget build(BuildContext context) {  
368 - return Scaffold(  
369 - body: Center(  
370 - child: GetBuilder<Controller>(  
371 - builder: (s) => Text('${s.counter}'),  
372 - ),  
373 - ),  
374 - );  
375 - }  
376 -  
377 -```  
378 -If you need to use your controller in many other places, and outside of GetBuilder, just create a get in your controller and have it easily. (or use `Get.find<Controller>()`)  
379 -  
380 -```dart  
381 -class Controller extends GetController {  
382 -  
383 - /// You do not need that. I recommend using it just for ease of syntax.  
384 - /// with static method: Controller.to.counter();  
385 - /// with no static method: Get.find<Controller>().counter();  
386 - /// There is no difference in performance, nor any side effect of using either syntax. Only one does not need the type, and the other the IDE will autocomplete it.  
387 - static Controller get to => Get.find(); // add this line  
388 -  
389 - int counter = 0;  
390 - void increment() {  
391 - counter++;  
392 - update();  
393 - }  
394 -}  
395 -```  
396 -And then you can access your controller directly, that way:  
397 -```dart  
398 -FloatingActionButton(  
399 - onPressed: () {  
400 - Controller.to.increment(),  
401 - } // This is incredibly simple!  
402 - child: Text("${Controller.to.counter}"),  
403 -),  
404 -```  
405 -When you press FloatingActionButton, all widgets that are listening to the 'counter' variable will be updated automatically.  
406 -  
407 -#### No StatefulWidget:  
408 -Using StatefulWidgets means storing the state of entire screens unnecessarily, even because if you need to minimally rebuild a widget, you will embed it in a Consumer/Observer/BlocProvider/GetBuilder/GetX/Obx, which will be another StatefulWidget.  
409 -The StatefulWidget class is a class larger than StatelessWidget, which will allocate more RAM, and this may not make a significant difference between one or two classes, but it will most certainly do when you have 100 of them!  
410 -Unless you need to use a mixin, like TickerProviderStateMixin, it will be totally unnecessary to use a StatefulWidget with Get.  
411 -  
412 -You can call all methods of a StatefulWidget directly from a GetBuilder.  
413 -If you need to call initState() or dispose() method for example, you can call them directly;  
414 -  
415 -```dart  
416 -GetBuilder<Controller>(  
417 - initState: (_) => Controller.to.fetchApi(),  
418 - dispose: (_) => Controller.to.closeStreams(),  
419 - builder: (s) => Text('${s.username}'),  
420 -),  
421 -```  
422 -  
423 -A much better approach than this is to use the onInit() and onClose() method directly from your controller.  
424 -  
425 -```dart  
426 -@override  
427 -void onInit() {  
428 - fetchApi();  
429 - super.onInit();  
430 -}  
431 -```  
432 -  
433 -- NOTE: If you want to start a method at the moment the controller is called for the first time, you DON'T NEED to use constructors for this, in fact, using a performance-oriented package like Get, this borders on bad practice, because it deviates from the logic in which the controllers are created or allocated (if you create an instance of this controller, the constructor will be called immediately, you will be populating a controller before it is even used, you are allocating memory without it being in use, this definitely hurts the principles of this library). The onInit() methods; and onClose(); were created for this, they will be called when the Controller is created, or used for the first time, depending on whether you are using Get.lazyPut or not. If you want, for example, to make a call to your API to populate data, you can forget about the old-fashioned method of initState/dispose, just start your call to the api in onInit, and if you need to execute any command like closing streams, use the onClose() for that.  
434 -The purpose of this package is precisely to give you a complete solution for navigation of routes, management of dependencies and states, using the least possible dependencies, with a high degree of decoupling. Get engages all high and low level Flutter APIs within itself, to ensure that you work with the least possible coupling. We centralize everything in a single package, to ensure that you don't have any kind of coupling in your project. That way, you can put only widgets in your view, and leave the part of your team that works with the business logic free, to work with the business logic without depending on any element of the View. This provides a much cleaner working environment, so that part of your team works only with widgets, without worrying about sending data to your controller, and part of your team works only with the business logic in its breadth, without depending on no element of the view.  
435 -  
436 -So to simplify this:  
437 -You don't need to call methods in initState and send them by parameter to your controller, nor use your controller constructor for that, you have the onInit() method that is called at the right time for you to start your services.  
438 -You do not need to call the device, you have the onClose() method that will be called at the exact moment when your controller is no longer needed and will be removed from memory. That way, leave views for widgets only, refrain from any kind of business logic from it.  
439 -  
440 -Do not call a dispose method inside GetController, it will not do anything, remember that the controller is not a Widget, you should not "dispose" it, and it will be automatically and intelligently removed from memory by Get. If you used any stream on it and want to close it, just insert it into the close method. Example:  
441 -  
442 -```dart  
443 -class Controller extends GetController {  
444 - StreamController<User> user = StreamController<User>();  
445 - StreamController<String> name = StreamController<String>();  
446 -  
447 - /// close stream = onClose method, not dispose.  
448 - @override  
449 - void onClose() {  
450 - user.close();  
451 - name.close();  
452 - super.onClose();  
453 - }  
454 -}  
455 -```  
456 -Controller life cycle:  
457 -- onInit() where it is created.  
458 -- onClose() where it is closed to make any changes in preparation for the delete method  
459 -- deleted: you do not have access to this API because it is literally removing the controller from memory. It is literally deleted, without leaving any trace.  
460 -  
461 -##### Forms of use:  
462 -  
463 -You can use Controller instance directly on GetBuilder value:  
464 -  
465 -```dart  
466 -GetBuilder<Controller>(  
467 - init: Controller(),  
468 - builder: (value) => Text(  
469 - '${value.counter}', //here  
470 - ),  
471 -),  
472 -```  
473 -You may also need an instance of your controller outside of your GetBuilder, and you can use these approaches to achieve this:  
474 -  
475 -```dart  
476 -class Controller extends GetController {  
477 - static Controller get to => Get.find();  
478 -[...]  
479 -}  
480 -// on you view:  
481 -GetBuilder<Controller>(  
482 - init: Controller(), // use it only first time on each controller  
483 - builder: (_) => Text(  
484 - '${Controller.to.counter}', //here  
485 - )  
486 -),  
487 -```  
488 -or  
489 -```dart  
490 -class Controller extends GetController {  
491 - // static Controller get to => Get.find(); // with no static get  
492 -[...]  
493 -}  
494 -// on stateful/stateless class  
495 -GetBuilder<Controller>(  
496 - init: Controller(), // use it only first time on each controller  
497 - builder: (_) => Text(  
498 - '${Get.find<Controller>().counter}', //here  
499 - ),  
500 -),  
501 -```  
502 -  
503 -- You can use "non-canonical" approaches to do this. If you are using some other dependency manager, like get_it, modular, etc., and just want to deliver the controller instance, you can do this:  
504 -  
505 -```dart  
506 -Controller controller = Controller();  
507 -[...]  
508 -GetBuilder<Controller>(  
509 - init: controller, //here  
510 - builder: (_) => Text(  
511 - '${controller.counter}', // here  
512 - ),  
513 -),  
514 -  
515 -```  
516 -<!-- This approach is not recommended, as you will have to manually dispose of your controllers, close your streams manually, and literally give up one of the great benefits of this library, which is intelligent memory control. But if you trust your potential, go ahead! -->  
517 -  
518 -  
519 -If you want to refine a widget's update control with GetBuilder, you can assign them unique IDs:  
520 -```dart  
521 -GetBuilder<Controller>(  
522 - id: 'text'  
523 - init: Controller(), // use it only first time on each controller  
524 - builder: (_) => Text(  
525 - '${Get.find<Controller>().counter}', //here  
526 - ),  
527 -),  
528 -```  
529 -And update it this form:  
530 -```dart  
531 -update(['text']);  
532 -```  
533 -You can also impose conditions for the update:  
534 -  
535 -```dart  
536 -update(['text'], counter < 10);  
537 -```  
538 -  
539 -GetX does this automatically and only reconstructs the widget that uses the exact variable that was changed, if you change a variable to the same as the previous one and that does not imply a change of state , GetX will not rebuild the widget to save memory and CPU cycles (3 is being displayed on the screen, and you change the variable to 3 again. In most state managers, this will cause a new rebuild, but with GetX the widget will only is rebuilt again, if in fact his state has changed).  
540 -GetBuilder is aimed precisely at multiple state control. Imagine that you added 30 products to a cart, you click delete one, at the same time that the list is updated, the price is updated and the badge in the shopping cart is updated to a smaller number. This type of approach makes GetBuilder killer, because it groups states and changes them all at once without any "computational logic" for that. GetBuilder was created with this type of situation in mind, since for ephemeral change of state, you can use setState and you would not need a state manager for this. However, there are situations where you want only the widget where a certain variable has been changed to be rebuilt, and this is what GetX does with a mastery never seen before.  
541 -  
542 -That way, if you want an individual controller, you can assign IDs for that, or use GetX. This is up to you, remembering that the more "individual" widgets you have, the more the performance of GetX will stand out, while the performance of GetBuilder should be superior, when there is multiple change of state.  
543 -  
544 -You can use both in any situation, but if you want to tune their application to the maximum possible performance, I would say that: if your variables are changed at different times, use GetX, because there is no competition for it when the subject is to rebuild only what is necessary, if you do not need unique IDs, because all your variables will be changed when you perform an action, use GetBuilder, because it is a simple state updater in blocks, made in a few lines of code, to make just what he promises to do: update state in blocks. There is no way to compare RAM, CPU, or anything else from a giant state manager to a simple StatefulWidget (like GetBuilder) that is updated when you call update(this). It was done in a simple way, to have the least computational logic involved, just to fulfill a single purpose and spend the minimum resources possible for that purpose.  
545 -If you want a powerful state manager, you can go without fear to GetX. It does not work with variables, but flows, everything in it is streams under the hood. You can use rxDart in conjunction with it, because everything is stream, you can hear the event of each "variable", because everything in it is stream, it is literally BLoC, easier than MobX, and without code generator or decorations .  
546 -  
547 -  
548 -## Reactive State Manager  
549 -  
550 -If you want power, Get gives you the most advanced state manager you could ever have.  
551 -GetX was built 100% based on Streams, and give you all the firepower that BLoC gave you, with an easier facility than using MobX.  
552 -Without decorations, you can turn anything into Observable with just a ".obs".  
553 -  
554 -Maximum performance: In addition to having a smart algorithm for minimal reconstruction, Get uses comparators to make sure the state has changed. If you experience any errors in your application, and send a duplicate change of state, Get will ensure that your application does not collapse.  
555 -The state only changes if the values ​​change. That's the main difference between Get, and using Computed from MobX. When joining two observables, when one is changed, the hearing of that observable will change. With Get, if you join two variables (which is unnecessary computed for that), GetX (similar to Observer) will only change if it implies a real change of state. Example:  
556 -  
557 -```dart  
558 -final count1 = 0.obs;  
559 -final count2 = 0.obs;  
560 -int get sum => count1.value + count2.value;  
561 -```  
562 -  
563 -```dart  
564 -GetX<Controller>(  
565 - builder: (_) {  
566 - print("count 1 rebuild");  
567 - return Text('${_.count1.value}');  
568 - },  
569 -),  
570 -GetX<Controller>(  
571 - builder: (_) {  
572 - print("count 2 rebuild");  
573 - return Text('${_.count2.value}');  
574 - },  
575 -),  
576 -GetX<Controller>(  
577 - builder: (_) {  
578 - print("count 3 rebuild");  
579 - return Text('${_.sum}');  
580 - },  
581 -),  
582 -```  
583 -  
584 -If we increment the number of count 1, only count 1 and count 3 are reconstructed, because count 1 now has a value of 1, and 1 + 0 = 1, changing the sum value.  
585 -  
586 -If we change count 2, only count2 and 3 are reconstructed, because the value of 2 has changed, and the result of the sum is now 2.  
587 -  
588 -If we add the number 1 to count 1, which already contains 1, no widget is reconstructed. If we add a value of 1 for count 1 and a value of 2 for count 2, only 2 and 3 will be reconstructed, simply because GetX not only changes what is necessary, it avoids duplicating events.  
589 -  
590 -In addition, Get provides refined state control. You can condition an event (such as adding an object to a list), on a certain condition.  
591 -  
592 -```dart  
593 -list.addIf(item<limit, item);  
594 -```  
595 -  
596 -Without decorations, without a code generator, without complications, GetX will change the way you manage your states in Flutter, and that is not a promise, it is a certainty!  
597 -  
598 -Do you know Flutter's counter app? Your Controller class might look like this:  
599 -  
600 -```dart  
601 -class CountCtl extends RxController {  
602 - final count = 0.obs;  
603 -}  
604 -```  
605 -With a simple:  
606 -```dart  
607 -ctl.count.value++  
608 -```  
609 -  
610 -You could update the counter variable in your UI, regardless of where it is stored.  
611 -  
612 -You can transform anything on obs:  
613 -  
614 -```dart  
615 -class RxUser {  
616 - final name = "Camila".obs;  
617 - final age = 18.obs;  
618 -}  
619 -  
620 -class User {  
621 - User({String name, int age});  
622 - final rx = RxUser();  
623 -  
624 - String get name => rx.name.value;  
625 - set name(String value) => rx.name.value = value;  
626 -  
627 - int get age => rx.age.value;  
628 - set age(int value) => rx.age.value = value;  
629 -}  
630 -```  
631 -  
632 -```dart  
633 -  
634 -void main() {  
635 - final user = User();  
636 - print(user.name);  
637 - user.age = 23;  
638 - user.rx.age.listen((int age) => print(age));  
639 - user.age = 24;  
640 - user.age = 25;  
641 -}  
642 -___________  
643 -out:  
644 -Camila  
645 -23  
646 -24  
647 -25  
648 -  
649 -```  
650 -  
651 -Working with Lists using Get is the best and most enjoyable thing in the world. They are completely observable as are the objects within it. That way, if you add a value to a list, it will automatically rebuild the widgets that use it.  
652 -You also don't need to use ".value" with lists, the amazing dart api allowed us to remove that, unfortunate primitive types like String and int cannot be extended, making the use of .value mandatory, but that won't be a problem if you work with gets and setters for these.  
653 -  
654 -```dart  
655 -final list = List<User>().obs;  
656 -```  
657 -  
658 -```dart  
659 -ListView.builder (  
660 - itemCount: list.lenght  
661 -)  
662 -```  
663 -  
664 -You don't have to work with sets if you don't want to. you can use the "assign 'and" assignAll "api.  
665 -The "assign" api will clear your list, and add a single object that you want to start there.  
666 -The "assignAll" api will clear the existing list and add any iterable objects that you inject into it.  
667 -  
668 -We could remove the obligation to use 'value' to String and int with a simple decoration and code generator, but the purpose of this lib is precisely not to need any external dependency. It is to offer an environment ready for programming, involving the essentials (management of routes, dependencies and states), in a simple, light and performance way without needing any external package. You can literally add 3 letters to your pubspec (get) and start programming. All solutions included by default, from route management to state management, aim at ease, productivity and performance. The total weight of this library is less than that of a single state manager, even though it is a complete solution, and that is what you must understand. If you are bothered by value, and like a code generator, MobX is a great alternative, and you can use it in conjunction with Get. For those who want to add a single dependency in pubspec and start programming without worrying about the version of a package being incompatible with another, or if the error of a state update is coming from the state manager or dependency, or still, do not want to worrying about the availability of controllers, whether literally "just programming", get is just perfect.  
669 -If you have no problem with the MobX code generator, or have no problem with the BLoC boilerplate, you can simply use Get for routes, and forget that it has state manager. Get SEM and RSM were born out of necessity, my company had a project with more than 90 controllers, and the code generator simply took more than 30 minutes to complete its tasks after a Flutter Clean on a reasonably good machine, if your project it has 5, 10, 15 controllers, any state manager will supply you well. If you have an absurdly large project, and code generator is a problem for you, you have been awarded this solution.  
670 -  
671 -Obviously, if someone wants to contribute to the project and create a code generator, or something similar, I will link in this readme as an alternative, my need is not the need for all devs, but for now I say, there are good solutions that already do that, like MobX.  
672 -  
673 -Typing in Get using Bindings is unnecessary. you can use the Obx widget instead of GetX which only receives the anonymous function that creates a widget.  
674 -Obviously, if you don't use a type, you will need to have an instance of your controller to use the variables, or use `Get.find<Controller>()` .value or Controller.to.value to retrieve the value.  
675 -  
676 -### GetX vs GetBuilder vs Obx vs MixinBuilder  
677 -In a decade working with programming I was able to learn some valuable lessons.  
678 -My first contact with reactive programming was so "wow, this is incredible" and in fact reactive programming is incredible.  
679 -However, it is not suitable for all situations. Often all you need is to change the state of 2 or 3 widgets at the same time, or an ephemeral change of state, in which case reactive programming is not bad, but it is not appropriate.  
680 -Reactive programming has a higher consumption of RAM consumption that can be compensated for by the individual workflow, which will ensure that only one widget is rebuilt and when necessary, but creating a list with 80 objects, each with several streams is not a good one idea. Open the dart inspect and check how much a StreamBuilder consumes, and you'll understand what I'm trying to tell you.  
681 -With that in mind, I created the simple state manager. It is simple, and that is exactly what you should demand from it: updating state in blocks in a simple way, and in the most economical way.  
682 -GetBuilder is very economical in RAM, and there is hardly a more economical approach than him (at least I can't imagine one, if it exists, please let us know).  
683 -However, GetBuilder is still a mechanical state manager, you need to call update() just like you would need to call Provider's notifyListeners().  
684 -There are other situations where reactive programming is really interesting, and not working with it is the same as reinventing the wheel. With that in mind, GetX was created to provide everything that is most modern and advanced in a state manager. It updates only what is necessary and when necessary, if you have an error and send 300 state changes simultaneously, GetX will filter and update the screen only if the state actually changes.  
685 -GetX is still more economical than any other reactive state manager, but it consumes a little more RAM than GetBuilder. Thinking about it and aiming to maximize the consumption of resources that Obx was created. Unlike GetX and GetBuilder, you will not be able to initialize a controller inside an Obx, it is just a Widget with a StreamSubscription that receives change events from your children, that's all. It is more economical than GetX, but loses to GetBuilder, which was to be expected, since it is reactive, and GetBuilder has the most simplistic approach that exists, of storing a widget's hashcode and its StateSetter. With Obx you don't need to write your controller type, and you can hear the change from multiple different controllers, but it needs to be initialized before, either using the example approach at the beginning of this readme, or using the Bindings class.  
686 -Finally, some people opened a resource request, as they wanted to use only one type of reactive variable, and the other mechanics, and needed to insert an Obx into a GetBuilder for this. Thinking about it MixinBuilder was created. It allows both reactive changes by changing ".obs" variables, and mechanical updates via update(). However, of the 4 widgets he is the one that consumes the most resources, since in addition to having a Subscription to receive change events from his children, he subscribes to the update method of his controller.  
687 -  
688 -- Note: To use GetBuilder and MixinBuilder you must use GetController. To use GetX and Obx you must use RxController.  
689 -Probably using a GetController using GetX and Obx will work, but it will not be possible to use an RxController on a GetBuilder.  
690 -Extending these controllers is important, as they have life cycles, and can "start" and "end" events in their onInit() and onClose() methods.  
691 -  
692 -## Simple Instance Manager  
693 -- Note: If you are using Get's State Manager, you don't have to worry about that, just read for information, but pay more attention to the bindings api, which will do all of this automatically for you.  
694 -  
695 -Are you already using Get and want to make your project as lean as possible? Get has a simple and powerful dependency manager that allows you to retrieve the same class as your Bloc or Controller with just 1 lines of code, no Provider context, no inheritedWidget:  
696 -  
697 -```dart  
698 -Controller controller = Get.put(Controller()); // Rather Controller controller = Controller();  
699 -```  
700 -Instead of instantiating your class within the class you are using, you are instantiating it within the Get instance, which will make it available throughout your App.  
701 -So you can use your controller (or class Bloc) normally  
702 -  
703 -```dart  
704 -controller.fetchApi();  
705 -```  
706 -  
707 -Imagine that you have navigated through numerous routes, and you need a data that was left behind in your controller, you would need a state manager combined with the Provider or Get_it, correct? Not with Get. You just need to ask Get to "find" for your controller, you don't need any additional dependencies:  
708 -  
709 -```dart  
710 -Controller controller = Get.find();  
711 -//Yes, it looks like Magic, Get will find your controller, and will deliver it to you. You can have 1 million controllers instantiated, Get will always give you the right controller.  
712 -```  
713 -And then you will be able to recover your controller data that was obtained back there:  
714 -  
715 -```dart  
716 -Text(controller.textFromApi);  
717 -```  
718 -  
719 -Looking for lazy loading? You can declare all your controllers, and it will be called only when someone needs it. You can do this with:  
720 -```dart  
721 -Get.lazyPut<Service>(()=> ApiMock());  
722 -/// ApiMock will only be called when someone uses Get.find<Service> for the first time  
723 -```  
724 -  
725 -If you want to register an asynchronous instance, you can use Get.putAsync.  
726 -```dart  
727 -Get.putAsync<SharedPreferences>(() async {  
728 - final prefs = await SharedPreferences.getInstance();  
729 - await prefs.setInt('counter', 12345);  
730 - return prefs;  
731 -});  
732 -```  
733 -usage:  
734 -  
735 -```dart  
736 - int count = Get.find<SharedPreferences>().getInt('counter');  
737 - print(count);  
738 - // out: 12345  
739 -}  
740 -```  
741 -  
742 -To remove a instance of Get:  
743 -```dart  
744 -Get.delete<Controller>();  
745 -```  
746 -  
747 -## Bindings  
748 -One of the great differentials of this package, perhaps, is the possibility of full integration of the routes, state manager and dependency manager.  
749 -When a route is removed from the Stack, all controllers, variables, and instances of objects related to it are removed from memory. If you are using streams or timers, they will be closed automatically, and you don't have to worry about any of that.  
750 -In version 2.10 Get completely implemented the Bindings API.  
751 -Now you no longer need to use the init method. You don't even have to type your controllers if you don't want to. You can start your controllers and services in the appropriate place for that.  
752 -The Binding class is a class that will decouple dependency injection, while "binding" routes to the state manager and dependency manager.  
753 -This allows Get to know which screen is being displayed when a particular controller is used and to know where and how to dispose of it.  
754 -In addition, the Binding class will allow you to have SmartManager configuration control. You can configure the dependencies to be arranged when removing a route from the stack, or when the widget that used it is laid out, or neither. You will have intelligent dependency management working for you, but even so, you can configure it as you wish.  
755 -  
756 -#### To use this API you only need:  
757 -- Create a class and implements Binding  
758 -  
759 -```dart  
760 -class HomeBinding implements Bindings{  
761 -```  
762 -  
763 -Your IDE will automatically ask you to override the "dependencies" method, and you just need to click on the lamp, override the method, and insert all the classes you are going to use on that route:  
764 -  
765 -```dart  
766 -class HomeBinding implements Bindings{  
767 - @override  
768 - void dependencies() {  
769 - Get.lazyPut<ControllerX>(() => ControllerX());  
770 - Get.lazyPut<Service>(()=> Api());  
771 - }  
772 -}  
773 -```  
774 -Now you just need to inform your route, that you will use that binding to make the connection between route manager, dependencies and states.  
775 -  
776 -- Using named routes:  
777 -```dart  
778 -namedRoutes: {  
779 - '/': GetRoute(Home(), binding: HomeBinding())  
780 -}  
781 -```  
782 -  
783 -- Using normal routes:  
784 -```dart  
785 -Get.to(Home(), binding: HomeBinding());  
786 -```  
787 -  
788 -There, you don't have to worry about memory management of your application anymore, Get will do it for you.  
789 -  
790 -The Binding class is called when a route is called, you can create an "initialBinding in your GetMaterialApp to insert all the dependencies that will be created.  
791 -```dart  
792 -GetMaterialApp(  
793 - initialBinding: SampleBind(),  
794 - home: Home(),  
795 -);  
796 -```  
797 -  
798 -Always prefer to use standard SmartManagement (full), you do not need to configure anything for that, Get already gives it to you by default. It will surely eliminate all your disused controllers from memory, as its refined control removes the dependency, even if a failure occurs and a widget that uses it is not properly disposed.  
799 -The "full" mode is also safe enough to be used with StatelessWidget, as it has numerous security callbacks that will prevent a controller from remaining in memory if it is not being used by any widget, and disposition is not important here. However, if you are bothered by the default behavior, or just don't want it to happen, Get offers other, more lenient options for intelligent memory management, such as SmartManagement.onlyBuilders, which will depend on the effective removal of widgets using the controller. tree to remove it, and you can prevent a controller from being deployed using "autoRemove: false" in your GetBuilder/GetX.  
800 -With this option, only controllers started in "init:" or loaded into a Binding with "Get.lazyPut" will be disposed, if you use Get.put or any other approach, SmartManagement will not have permissions to exclude this dependency.  
801 -With the default behavior, even widgets instantiated with "Get.put" will be removed, unlike SmartManagement.onlyBuilders.  
802 -SmartManagement.keepFactory is like SmartManagement.full, with one difference. SmartManagement.full purges the factories from the premises, so that Get.lazyPut() will only be able to be called once and your factory and references will be self-destructing. SmartManagement.keepFactory will remove its dependencies when necessary, however, it will keep the "shape" of these, to make an equal one if you need an instance of that again.  
803 -Instead of using SmartManagement.keepFactory you can use Bindings.  
804 -Bindings creates transitory factories, which are created the moment you click to go to another screen, and will be destroyed as soon as the screen-changing animation happens. It is so little time that the analyzer will not even be able to register it. When you navigate to this screen again, a new temporary factory will be called, so this is preferable to using SmartManagement.keepFactory, but if you don't want to create Bindings, or want to keep all your dependencies on the same Binding, it will certainly help you . Factories take up little memory, they don't hold instances, but a function with the "shape" of that class you want. This is very little, but since the purpose of this lib is to get the maximum performance possible using the minimum resources, Get removes even the factories by default. Use whichever is most convenient for you.  
805 -  
806 -- NOTE: DO NOT USE SmartManagement.keepFactory if you are using multiple Bindings. It was designed to be used without Bindings, or with a single Binding linked in the GetMaterialApp's initialBinding.  
807 -  
808 -- NOTE2: Using Bindings is completely optional, you can use Get.put() and Get.find() on classes that use a given controller without any problem.  
809 -However, if you work with Services or any other abstraction, I recommend using Bindings for a larger organization.  
810 -  
811 -## Workers:  
812 -Workers will assist you, triggering specific callbacks when an event occurs.  
813 -  
814 -  
815 -```dart  
816 -/// Called every time the variable $_ is changed  
817 -ever(count1, (_) => print("$_ has been changed"));  
818 -  
819 -/// Called only first time the variable $_ is changed  
820 -once(count1, (_) => print("$_ was changed once"));  
821 -  
822 -/// Anti DDos - Called every time the user stops typing for 1 second, for example.  
823 -debounce(count1, (_) => print("debouce$_"), time: Duration(seconds: 1));  
824 -  
825 -/// Ignore all changes within 1 second.  
826 -interval(count1, (_) => print("interval $_"), time: Duration(seconds: 1));  
827 -```  
828 -- ever  
829 -'ever' is called every time its variable is changed. That's it.  
830 -  
831 -- ever  
832 -'once' is called only the first time the variable has been changed.  
833 -  
834 -- debounce  
835 -'debounce' is very useful in search functions, where you only want the API to be called when the user finishes typing. If the user types "Jonny", you will have 5 searches in the APIs, by the letter J, o, n, n, and y. With Get this does not happen, because you will have a "debounce" Worker that will only be triggered at the end of typing.  
836 -  
837 -- interval  
838 -'interval' is different from the debouce. debouce if the user makes 1000 changes to a variable within 1 second, he will send only the last one after the stipulated timer (the default is 800 milliseconds). Interval will instead ignore all user actions for the stipulated period. If you send events for 1 minute, 1000 per second, debounce will only send you the last one, when the user stops strafing events. interval will deliver events every second, and if set to 3 seconds, it will deliver 20 events that minute. This is recommended to avoid abuse, in functions where the user can quickly click on something and get some advantage (imagine that the user can earn coins by clicking on something, if he clicked 300 times in the same minute, he would have 300 coins, using interval, you you can set a time frame for 3 seconds, and even then clicking 300 or a thousand times, the maximum he would get in 1 minute would be 20 coins, clicking 300 or 1 million times). The debounce is suitable for anti-DDos, for functions like search where each change to onChange would cause a query to your api. Debounce will wait for the user to stop typing the name, to make the request. If it were used in the coin scenario mentioned above, the user would only win 1 coin, because it is only executed, when the user "pauses" for the established time.  
839 -  
840 -  
841 -## Navigate with named routes:  
842 -- If you prefer to navigate by namedRoutes, Get also supports this.  
843 -  
844 -To navigate to nextScreen  
845 -```dart  
846 -Get.toNamed("/NextScreen");  
847 -```  
848 -To navigate and remove the previous screen from the tree.  
849 -```dart  
850 -Get.offNamed("/NextScreen");  
851 -```  
852 -To navigate and remove all previous screens from the tree.  
853 -```dart  
854 -Get.offAllNamed("/NextScreen");  
855 -```  
856 -  
857 -To define routes, use GetMaterialApp:  
858 -  
859 -```dart  
860 -void main() {  
861 - runApp(  
862 - GetMaterialApp(  
863 - initialRoute: '/',  
864 - namedRoutes: {  
865 - '/': GetRoute(page: MyHomePage()),  
866 - '/second': GetRoute(page: Second()),  
867 - '/third': GetRoute(page: Third(),transition: Transition.cupertino);  
868 - },  
869 - )  
870 - );  
871 -}  
872 -```  
873 -  
874 -### Send data to named Routes:  
875 -  
876 -Just send what you want for arguments. Get accepts anything here, whether it is a String, a Map, a List, or even a class instance.  
877 -```dart  
878 -Get.toNamed("/NextScreen", arguments: 'Get is the best');  
879 -```  
880 -on your class or controller:  
881 -  
882 -```dart  
883 -print(Get.arguments);  
884 -//print out: Get is the best  
885 -```  
886 -  
887 -#### Dynamic urls links  
888 -Get offer advanced dynamic urls just like on the Web. Web developers have probably already wanted this feature on Flutter, and most likely have seen a package promise this feature and deliver a totally different syntax than a URL would have on web, but Get also solves that.  
889 -  
890 -```dart  
891 -Get.offAllNamed("/NextScreen?device=phone&id=354&name=Enzo");  
892 -```  
893 -on your controller/bloc/stateful/stateless class:  
894 -  
895 -```dart  
896 -print(Get.parameters['id']);  
897 -// out: 354  
898 -print(Get.parameters['name']);  
899 -// out: Enzo  
900 -```  
901 -  
902 -You can also receive NamedParameters with Get easily:  
903 -  
904 -```dart  
905 -void main() {  
906 - runApp(  
907 - GetMaterialApp(  
908 - initialRoute: '/',  
909 - namedRoutes: {  
910 - '/': GetRoute(page: MyHomePage()),  
911 - /// Important! :user is not a new route, it is just a parameter  
912 - /// specification. Do not use '/second/:user' and '/second'  
913 - /// if you need new route to user, use '/second/user/:user'  
914 - /// if '/second' is a route.  
915 - '/second/:user': GetRoute(page: Second()), // receive ID  
916 - '/third': GetRoute(page: Third(),transition: Transition.cupertino);  
917 - },  
918 - )  
919 - );  
920 -}  
921 -```  
922 -Send data on route name  
923 -```dart  
924 -Get.toNamed("/second/34954");  
925 -```  
926 -  
927 -On second screen take the data by parameter  
928 -  
929 -```dart  
930 -print(Get.parameters['user']);  
931 -// out: 34954  
932 -```  
933 -  
934 -And now, all you need to do is use Get.toNamed() to navigate your named routes, without any context (you can call your routes directly from your BLoC or Controller class), and when your app is compiled to the web, your routes will appear in the url <3  
935 -  
936 -  
937 -#### Middleware  
938 -If you want listen Get events to trigger actions, you can to use routingCallback to it  
939 -```dart  
940 -GetMaterialApp(  
941 - routingCallback: (route) {  
942 - if(routing.current == '/second'){  
943 - openAds();  
944 - }  
945 - }  
946 -)  
947 -```  
948 -If you are not using GetMaterialApp, you can use the manual API to attach Middleware observer.  
949 -  
950 -```dart  
951 -void main() {  
952 - runApp(  
953 - MaterialApp(  
954 - onGenerateRoute: Router.generateRoute,  
955 - initialRoute: "/",  
956 - navigatorKey: Get.key,  
957 - navigatorObservers: [  
958 - GetObserver(MiddleWare.observer), // HERE !!!  
959 - ],  
960 - ),  
961 - );  
962 -}  
963 -```  
964 -Create a MiddleWare class  
965 -  
966 -```dart  
967 -class MiddleWare {  
968 - static observer(Routing routing) {  
969 - /// You can listen in addition to the routes, the snackbars, dialogs and bottomsheets on each screen.  
970 - ///If you need to enter any of these 3 events directly here,  
971 - ///you must specify that the event is != Than you are trying to do.  
972 - if (routing.current == '/second' && !routing.isSnackbar) {  
973 - Get.snackbar("Hi", "You are on second route");  
974 - } else if (routing.current =='/third'){  
975 - print('last route called');  
976 - }  
977 - }  
978 -}  
979 -```  
980 -  
981 -Now, use Get on your code:  
982 -  
983 -```dart  
984 -class First extends StatelessWidget {  
985 - @override  
986 - Widget build(BuildContext context) {  
987 - return Scaffold(  
988 - appBar: AppBar(  
989 - leading: IconButton(  
990 - icon: Icon(Icons.add),  
991 - onPressed: () {  
992 - Get.snackbar("hi", "i am a modern snackbar");  
993 - },  
994 - ),  
995 - title: Text('First Route'),  
996 - ),  
997 - body: Center(  
998 - child: RaisedButton(  
999 - child: Text('Open route'),  
1000 - onPressed: () {  
1001 - Get.toNamed("/second");  
1002 - },  
1003 - ),  
1004 - ),  
1005 - );  
1006 - }  
1007 -}  
1008 -  
1009 -class Second extends StatelessWidget {  
1010 - @override  
1011 - Widget build(BuildContext context) {  
1012 - return Scaffold(  
1013 - appBar: AppBar(  
1014 - leading: IconButton(  
1015 - icon: Icon(Icons.add),  
1016 - onPressed: () {  
1017 - Get.snackbar("hi", "i am a modern snackbar");  
1018 - },  
1019 - ),  
1020 - title: Text('second Route'),  
1021 - ),  
1022 - body: Center(  
1023 - child: RaisedButton(  
1024 - child: Text('Open route'),  
1025 - onPressed: () {  
1026 - Get.toNamed("/third");  
1027 - },  
1028 - ),  
1029 - ),  
1030 - );  
1031 - }  
1032 -}  
1033 -  
1034 -class Third extends StatelessWidget {  
1035 - @override  
1036 - Widget build(BuildContext context) {  
1037 - return Scaffold(  
1038 - appBar: AppBar(  
1039 - title: Text("Third Route"),  
1040 - ),  
1041 - body: Center(  
1042 - child: RaisedButton(  
1043 - onPressed: () {  
1044 - Get.back();  
1045 - },  
1046 - child: Text('Go back!'),  
1047 - ),  
1048 - ),  
1049 - );  
1050 - }  
1051 -}  
1052 -```  
1053 -  
1054 -### Change Theme  
1055 -Please do not use any higher level widget than GetMaterialApp in order to update it. This can trigger duplicate keys. A lot of people are used to the prehistoric approach of creating a "ThemeProvider" widget just to change the theme of your app, and this is definitely NOT necessary with Get.  
1056 -  
1057 -You can create your custom theme and simply add it within Get.changeTheme without any boilerplate for that:  
1058 -  
1059 -  
1060 -```dart  
1061 -Get.changeTheme(ThemeData.light());  
1062 -```  
1063 -  
1064 -If you want to create something like a button that changes the theme with onTap, you can combine two Get APIs for that, the api that checks if the dark theme is being used, and the theme change API, you can just put this within an onPressed:  
1065 -  
1066 -```dart  
1067 -Get.changeTheme(Get.isDarkMode? ThemeData.light(): ThemeData.dark());  
1068 -```  
1069 -  
1070 -When darkmode is activated, it will switch to the light theme, and when the light theme is activated, it will change to dark.  
1071 -  
1072 -  
1073 -If you want to know in depth how to change the theme, you can follow this tutorial on Medium that even teaches the persistence of the theme using Get:  
1074 -  
1075 -- [Dynamic Themes in 3 lines using Get](https://medium.com/swlh/flutter-dynamic-themes-in-3-lines-c3b375f292e3) - Tutorial by [Rod Brown](https://github.com/RodBr).  
1076 -  
1077 -  
1078 -### Optional Global Settings  
1079 -You can create Global settings for Get. Just add Get.config to your code before pushing any route or do it directly in your GetMaterialApp  
1080 -  
1081 -```dart  
1082 -GetMaterialApp(  
1083 - enableLog: true,  
1084 - defaultTransition: Transition.fade,  
1085 - opaqueRoute: Get.isOpaqueRouteDefault,  
1086 - popGesture: Get.isPopGestureEnable,  
1087 - transitionDuration: Get.defaultDurationTransition,  
1088 - defaultGlobalState: Get.defaultGlobalState,  
1089 -);  
1090 -  
1091 -Get.config(  
1092 - enableLog = true,  
1093 - defaultPopGesture = true,  
1094 - defaultTransition = Transitions.cupertino  
1095 -)  
1096 -```  
1097 -  
1098 -  
1099 -### Nested Navigators  
1100 -  
1101 -Get made Flutter's nested navigation even easier.  
1102 -You don't need the context, and you will find your navigation stack by Id.  
1103 -  
1104 -- NOTE: Creating parallel navigation stacks can be dangerous. The ideal is not to use NestedNavigators, or to use sparingly. If your project requires it, go ahead, but keep in mind that keeping multiple navigation stacks in memory may not be a good idea for RAM consumption.  
1105 -  
1106 -See how simple it is:  
1107 -```dart  
1108 -Navigator(  
1109 - key: Get.nestedKey(1), // create a key by index  
1110 - initialRoute: '/',  
1111 - onGenerateRoute: (settings) {  
1112 - if (settings.name == '/') {  
1113 - return GetRouteBase(  
1114 - page: Scaffold(  
1115 - appBar: AppBar(  
1116 - title: Text("Main"),  
1117 - ),  
1118 - body: Center(  
1119 - child: FlatButton(  
1120 - color: Colors.blue,  
1121 - onPressed: () {  
1122 - Get.toNamed('/second', id:1); // navigate by your nested route by index  
1123 - },  
1124 - child: Text("Go to second"),  
1125 - ),  
1126 - ),  
1127 - ),  
1128 - );  
1129 - } else if (settings.name == '/second') {  
1130 - return GetRouteBase(  
1131 - page: Center(  
1132 - child: Scaffold(  
1133 - appBar: AppBar(  
1134 - title: Text("Main"),  
1135 - ),  
1136 - body: Center(  
1137 - child: Text("second")  
1138 - ),  
1139 - ),  
1140 - ),  
1141 - );  
1142 - }  
1143 - }  
1144 -),  
1145 -```  
1146 -  
1147 -### Other Advanced APIs and Manual configurations  
1148 -GetMaterialApp configures everything for you, but if you want to configure Get Manually using advanced APIs.  
1149 -  
1150 -```dart  
1151 -MaterialApp(  
1152 - navigatorKey: Get.key,  
1153 - navigatorObservers: [GetObserver()],  
1154 -);  
1155 -```  
1156 -  
1157 -You will also be able to use your own Middleware within GetObserver, this will not influence anything.  
1158 -  
1159 -```dart  
1160 -MaterialApp(  
1161 - navigatorKey: Get.key,  
1162 - navigatorObservers: [GetObserver(MiddleWare.observer)], // Here  
1163 -);  
1164 -```  
1165 -  
1166 -```dart  
1167 -Get.arguments // give the current args from currentScreen  
1168 -  
1169 -Get.previousArguments // give arguments of previous route  
1170 -  
1171 -Get.previousRoute // give name of previous route  
1172 -  
1173 -Get.rawRoute // give the raw route to access for example, rawRoute.isFirst()  
1174 -  
1175 -Get.routing // give access to Rounting API from GetObserver  
1176 -  
1177 -Get.isSnackbarOpen // check if snackbar is open  
1178 -  
1179 -Get.isDialogOpen // check if dialog is open  
1180 -  
1181 -Get.isBottomSheetOpen // check if bottomsheet is open  
1182 -  
1183 -Get.removeRoute() // remove one route.  
1184 -  
1185 -Get.until() // back repeatedly until the predicate returns true.  
1186 -  
1187 -Get.offUntil() // go to next route and remove all the previous routes until the predicate returns true.  
1188 -  
1189 -Get.offNamedUntil() // go to next named route and remove all the previous routes until the predicate returns true.  
1190 -  
1191 -GetPlatform.isAndroid/isIOS/isWeb... //(This method is completely compatible with FlutterWeb, unlike the framework. "Platform.isAndroid")  
1192 -  
1193 -Get.height / Get.width // Equivalent to the method: MediaQuery.of(context).size.height, but they are immutable. If you need a changeable height/width (like browser windows that can be scaled) you will need to use context.height and context.width  
1194 -  
1195 -Get.context // Gives the context of the screen in the foreground anywhere in your code.  
1196 -  
1197 -Get.contextOverlay // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code.  
1198 -  
1199 -```  
1200 -  
1201 -This library will always be updated and implementing new features. Feel free to offer PRs and contribute to them. 1 +# Flutter State Management
  2 +
  3 +A Flutter application showing different patterns of state management:
  4 +
  5 +* [**Stateful Widget**](https://github.com/udos86/flutter-state-management/tree/master/lib/_stateful_widget)
  6 +* [**Inherited Widget**](https://github.com/udos86/flutter-state-management/tree/master/lib/_inherited_widget)
  7 +* [**Inherited Model**](https://github.com/udos86/flutter-state-management/tree/master/lib/_inherited_model)
  8 +* [**Provider**](https://github.com/udos86/flutter-state-management/tree/master/lib/_provider)
  9 +* [**Scoped Model**](https://github.com/udos86/flutter-state-management/tree/master/lib/_scoped_model)
  10 +* [**Redux**](https://github.com/udos86/flutter-state-management/tree/master/lib/_redux)
  11 +* [**Business Logic Components (BLoC)**](https://github.com/udos86/flutter-state-management/tree/master/lib/_bloc)
  12 +* [**Business Logic Components (BLoC) with Library**](https://github.com/udos86/flutter-state-management/tree/master/lib/_bloc_lib)
  13 +* [**MobX**](https://github.com/udos86/flutter-state-management/tree/master/lib/_mobx)
  1 +def localProperties = new Properties()
  2 +def localPropertiesFile = rootProject.file('local.properties')
  3 +if (localPropertiesFile.exists()) {
  4 + localPropertiesFile.withReader('UTF-8') { reader ->
  5 + localProperties.load(reader)
  6 + }
  7 +}
  8 +
  9 +def flutterRoot = localProperties.getProperty('flutter.sdk')
  10 +if (flutterRoot == null) {
  11 + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  12 +}
  13 +
  14 +apply plugin: 'com.android.application'
  15 +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  16 +
  17 +android {
  18 + compileSdkVersion 29
  19 +
  20 + lintOptions {
  21 + disable 'InvalidPackage'
  22 + }
  23 +
  24 + defaultConfig {
  25 + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  26 + applicationId "de.udos.flutterstatemanagement"
  27 + minSdkVersion 16
  28 + targetSdkVersion 29
  29 + versionCode 1
  30 + versionName "1.0"
  31 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  32 + }
  33 +
  34 + buildTypes {
  35 + release {
  36 + // TODO: Add your own signing config for the release build.
  37 + // Signing with the debug keys for now, so `flutter run --release` works.
  38 + signingConfig signingConfigs.debug
  39 + }
  40 + }
  41 +}
  42 +
  43 +flutter {
  44 + source '../..'
  45 +}
  46 +
  47 +dependencies {
  48 + testImplementation 'junit:junit:4.12'
  49 + androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  50 + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  51 +}
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="de.udos.benchmarks">
  3 + <!-- Flutter needs it to communicate with the running application
  4 + to allow setting breakpoints, to provide hot reload, etc.
  5 + -->
  6 + <uses-permission android:name="android.permission.INTERNET"/>
  7 +</manifest>
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="de.udos.benchmarks">
  3 +
  4 + <!-- The INTERNET permission is required for development. Specifically,
  5 + flutter needs it to communicate with the running application
  6 + to allow setting breakpoints, to provide hot reload, etc.
  7 + -->
  8 + <uses-permission android:name="android.permission.INTERNET"/>
  9 +
  10 + <!-- io.flutter.app.FlutterApplication is an android.app.Application that
  11 + calls FlutterMain.startInitialization(this); in its onCreate method.
  12 + In most cases you can leave this as-is, but you if you want to provide
  13 + additional functionality it is fine to subclass or reimplement
  14 + FlutterApplication and put your custom class here. -->
  15 + <application
  16 + android:name="io.flutter.app.FlutterApplication"
  17 + android:label="benckmark"
  18 + android:icon="@mipmap/ic_launcher">
  19 + <activity
  20 + android:name=".MainActivity"
  21 + android:launchMode="singleTop"
  22 + android:theme="@style/LaunchTheme"
  23 + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
  24 + android:hardwareAccelerated="true"
  25 + android:windowSoftInputMode="adjustResize">
  26 + <!-- This keeps the window background of the activity showing
  27 + until Flutter renders its first frame. It can be removed if
  28 + there is no splash screen (such as the default splash screen
  29 + defined in @style/LaunchTheme). -->
  30 + <meta-data
  31 + android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
  32 + android:value="true" />
  33 + <intent-filter>
  34 + <action android:name="android.intent.action.MAIN"/>
  35 + <category android:name="android.intent.category.LAUNCHER"/>
  36 + </intent-filter>
  37 + </activity>
  38 + </application>
  39 +</manifest>
  1 +package de.udos.benchmarks;
  2 +
  3 +import android.os.Bundle;
  4 +import io.flutter.app.FlutterActivity;
  5 +import io.flutter.plugins.GeneratedPluginRegistrant;
  6 +
  7 +public class MainActivity extends FlutterActivity {
  8 + @Override
  9 + protected void onCreate(Bundle savedInstanceState) {
  10 + super.onCreate(savedInstanceState);
  11 + GeneratedPluginRegistrant.registerWith(this);
  12 + }
  13 +}
  1 +package io.flutter.plugins;
  2 +
  3 +import io.flutter.plugin.common.PluginRegistry;
  4 +
  5 +/**
  6 + * Generated file. Do not edit.
  7 + */
  8 +public final class GeneratedPluginRegistrant {
  9 + public static void registerWith(PluginRegistry registry) {
  10 + if (alreadyRegisteredWith(registry)) {
  11 + return;
  12 + }
  13 + }
  14 +
  15 + private static boolean alreadyRegisteredWith(PluginRegistry registry) {
  16 + final String key = GeneratedPluginRegistrant.class.getCanonicalName();
  17 + if (registry.hasPlugin(key)) {
  18 + return true;
  19 + }
  20 + registry.registrarFor(key);
  21 + return false;
  22 + }
  23 +}
  1 +package de.udos.benchmarks
  2 +
  3 +import io.flutter.embedding.android.FlutterActivity
  4 +
  5 +class MainActivity: FlutterActivity() {
  6 +}
  1 +package de.udos.benchs
  2 +
  3 +import io.flutter.embedding.android.FlutterActivity
  4 +
  5 +class MainActivity: FlutterActivity() {
  6 +}
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Modify this file to customize your launch splash screen -->
  3 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  4 + <item android:drawable="@android:color/white" />
  5 +
  6 + <!-- You can insert your own image assets here -->
  7 + <!-- <item>
  8 + <bitmap
  9 + android:gravity="center"
  10 + android:src="@mipmap/launch_image" />
  11 + </item> -->
  12 +</layer-list>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
  4 + <!-- Show a splash screen on the activity. Automatically removed when
  5 + Flutter draws its first frame -->
  6 + <item name="android:windowBackground">@drawable/launch_background</item>
  7 + </style>
  8 +</resources>
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="de.udos.benchmarks">
  3 + <!-- Flutter needs it to communicate with the running application
  4 + to allow setting breakpoints, to provide hot reload, etc.
  5 + -->
  6 + <uses-permission android:name="android.permission.INTERNET"/>
  7 +</manifest>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<module type="JAVA_MODULE" version="4">
  3 + <component name="FacetManager">
  4 + <facet type="android" name="Android">
  5 + <configuration>
  6 + <option name="ALLOW_USER_CONFIGURATION" value="false" />
  7 + <option name="MANIFEST_FILE_RELATIVE_PATH" value="/app/src/main/AndroidManifest.xml" />
  8 + <option name="RES_FOLDER_RELATIVE_PATH" value="/app/src/main/res" />
  9 + <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/app/src/main/assets" />
  10 + <option name="LIBS_FOLDER_RELATIVE_PATH" value="/app/src/main/libs" />
  11 + <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/app/src/main/proguard_logs" />
  12 + </configuration>
  13 + </facet>
  14 + </component>
  15 + <component name="NewModuleRootManager" inherit-compiler-output="true">
  16 + <exclude-output />
  17 + <content url="file://$MODULE_DIR$">
  18 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/java" isTestSource="false" />
  19 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/kotlin" isTestSource="false" />
  20 + <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
  21 + </content>
  22 + <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
  23 + <orderEntry type="sourceFolder" forTests="false" />
  24 + <orderEntry type="library" name="Flutter for Android" level="project" />
  25 + <orderEntry type="library" name="KotlinJavaRuntime" level="project" />
  26 + </component>
  27 +</module>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<module type="JAVA_MODULE" version="4">
  3 + <component name="FacetManager">
  4 + <facet type="android" name="Android">
  5 + <configuration>
  6 + <option name="ALLOW_USER_CONFIGURATION" value="false" />
  7 + <option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/gen" />
  8 + <option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/gen" />
  9 + <option name="MANIFEST_FILE_RELATIVE_PATH" value="/app/src/main/AndroidManifest.xml" />
  10 + <option name="RES_FOLDER_RELATIVE_PATH" value="/app/src/main/res" />
  11 + <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/app/src/main/assets" />
  12 + <option name="LIBS_FOLDER_RELATIVE_PATH" value="/app/src/main/libs" />
  13 + <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/app/src/main/proguard_logs" />
  14 + </configuration>
  15 + </facet>
  16 + </component>
  17 + <component name="NewModuleRootManager" inherit-compiler-output="true">
  18 + <exclude-output />
  19 + <content url="file://$MODULE_DIR$">
  20 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/java" isTestSource="false" />
  21 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/kotlin" isTestSource="false" />
  22 + <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
  23 + </content>
  24 + <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
  25 + <orderEntry type="sourceFolder" forTests="false" />
  26 + <orderEntry type="library" name="Flutter for Android" level="project" />
  27 + <orderEntry type="library" name="KotlinJavaRuntime" level="project" />
  28 + </component>
  29 +</module>
  1 +buildscript {
  2 + repositories {
  3 + google()
  4 + jcenter()
  5 + }
  6 +
  7 + dependencies {
  8 + classpath 'com.android.tools.build:gradle:3.5.3'
  9 + }
  10 +}
  11 +
  12 +allprojects {
  13 + repositories {
  14 + google()
  15 + jcenter()
  16 + }
  17 +}
  18 +
  19 +rootProject.buildDir = '../build'
  20 +subprojects {
  21 + project.buildDir = "${rootProject.buildDir}/${project.name}"
  22 +}
  23 +subprojects {
  24 + project.evaluationDependsOn(':app')
  25 +}
  26 +
  27 +task clean(type: Delete) {
  28 + delete rootProject.buildDir
  29 +}
  1 +org.gradle.jvmargs=-Xmx1536M
  2 +android.enableR8=true
  3 +android.useAndroidX=true
  4 +android.enableJetifier=true
No preview for this file type
  1 +#Sat Jan 11 20:55:27 CET 2020
  2 +distributionBase=GRADLE_USER_HOME
  3 +distributionPath=wrapper/dists
  4 +zipStoreBase=GRADLE_USER_HOME
  5 +zipStorePath=wrapper/dists
  6 +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
  1 +#!/usr/bin/env bash
  2 +
  3 +##############################################################################
  4 +##
  5 +## Gradle start up script for UN*X
  6 +##
  7 +##############################################################################
  8 +
  9 +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
  10 +DEFAULT_JVM_OPTS=""
  11 +
  12 +APP_NAME="Gradle"
  13 +APP_BASE_NAME=`basename "$0"`
  14 +
  15 +# Use the maximum available, or set MAX_FD != -1 to use that value.
  16 +MAX_FD="maximum"
  17 +
  18 +warn ( ) {
  19 + echo "$*"
  20 +}
  21 +
  22 +die ( ) {
  23 + echo
  24 + echo "$*"
  25 + echo
  26 + exit 1
  27 +}
  28 +
  29 +# OS specific support (must be 'true' or 'false').
  30 +cygwin=false
  31 +msys=false
  32 +darwin=false
  33 +case "`uname`" in
  34 + CYGWIN* )
  35 + cygwin=true
  36 + ;;
  37 + Darwin* )
  38 + darwin=true
  39 + ;;
  40 + MINGW* )
  41 + msys=true
  42 + ;;
  43 +esac
  44 +
  45 +# Attempt to set APP_HOME
  46 +# Resolve links: $0 may be a link
  47 +PRG="$0"
  48 +# Need this for relative symlinks.
  49 +while [ -h "$PRG" ] ; do
  50 + ls=`ls -ld "$PRG"`
  51 + link=`expr "$ls" : '.*-> \(.*\)$'`
  52 + if expr "$link" : '/.*' > /dev/null; then
  53 + PRG="$link"
  54 + else
  55 + PRG=`dirname "$PRG"`"/$link"
  56 + fi
  57 +done
  58 +SAVED="`pwd`"
  59 +cd "`dirname \"$PRG\"`/" >/dev/null
  60 +APP_HOME="`pwd -P`"
  61 +cd "$SAVED" >/dev/null
  62 +
  63 +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
  64 +
  65 +# Determine the Java command to use to start the JVM.
  66 +if [ -n "$JAVA_HOME" ] ; then
  67 + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
  68 + # IBM's JDK on AIX uses strange locations for the executables
  69 + JAVACMD="$JAVA_HOME/jre/sh/java"
  70 + else
  71 + JAVACMD="$JAVA_HOME/bin/java"
  72 + fi
  73 + if [ ! -x "$JAVACMD" ] ; then
  74 + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
  75 +
  76 +Please set the JAVA_HOME variable in your environment to match the
  77 +location of your Java installation."
  78 + fi
  79 +else
  80 + JAVACMD="java"
  81 + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
  82 +
  83 +Please set the JAVA_HOME variable in your environment to match the
  84 +location of your Java installation."
  85 +fi
  86 +
  87 +# Increase the maximum file descriptors if we can.
  88 +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
  89 + MAX_FD_LIMIT=`ulimit -H -n`
  90 + if [ $? -eq 0 ] ; then
  91 + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
  92 + MAX_FD="$MAX_FD_LIMIT"
  93 + fi
  94 + ulimit -n $MAX_FD
  95 + if [ $? -ne 0 ] ; then
  96 + warn "Could not set maximum file descriptor limit: $MAX_FD"
  97 + fi
  98 + else
  99 + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
  100 + fi
  101 +fi
  102 +
  103 +# For Darwin, add options to specify how the application appears in the dock
  104 +if $darwin; then
  105 + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
  106 +fi
  107 +
  108 +# For Cygwin, switch paths to Windows format before running java
  109 +if $cygwin ; then
  110 + APP_HOME=`cygpath --path --mixed "$APP_HOME"`
  111 + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
  112 + JAVACMD=`cygpath --unix "$JAVACMD"`
  113 +
  114 + # We build the pattern for arguments to be converted via cygpath
  115 + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
  116 + SEP=""
  117 + for dir in $ROOTDIRSRAW ; do
  118 + ROOTDIRS="$ROOTDIRS$SEP$dir"
  119 + SEP="|"
  120 + done
  121 + OURCYGPATTERN="(^($ROOTDIRS))"
  122 + # Add a user-defined pattern to the cygpath arguments
  123 + if [ "$GRADLE_CYGPATTERN" != "" ] ; then
  124 + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
  125 + fi
  126 + # Now convert the arguments - kludge to limit ourselves to /bin/sh
  127 + i=0
  128 + for arg in "$@" ; do
  129 + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
  130 + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
  131 +
  132 + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
  133 + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
  134 + else
  135 + eval `echo args$i`="\"$arg\""
  136 + fi
  137 + i=$((i+1))
  138 + done
  139 + case $i in
  140 + (0) set -- ;;
  141 + (1) set -- "$args0" ;;
  142 + (2) set -- "$args0" "$args1" ;;
  143 + (3) set -- "$args0" "$args1" "$args2" ;;
  144 + (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
  145 + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
  146 + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
  147 + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
  148 + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
  149 + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
  150 + esac
  151 +fi
  152 +
  153 +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
  154 +function splitJvmOpts() {
  155 + JVM_OPTS=("$@")
  156 +}
  157 +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
  158 +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
  159 +
  160 +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
  1 +@if "%DEBUG%" == "" @echo off
  2 +@rem ##########################################################################
  3 +@rem
  4 +@rem Gradle startup script for Windows
  5 +@rem
  6 +@rem ##########################################################################
  7 +
  8 +@rem Set local scope for the variables with windows NT shell
  9 +if "%OS%"=="Windows_NT" setlocal
  10 +
  11 +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
  12 +set DEFAULT_JVM_OPTS=
  13 +
  14 +set DIRNAME=%~dp0
  15 +if "%DIRNAME%" == "" set DIRNAME=.
  16 +set APP_BASE_NAME=%~n0
  17 +set APP_HOME=%DIRNAME%
  18 +
  19 +@rem Find java.exe
  20 +if defined JAVA_HOME goto findJavaFromJavaHome
  21 +
  22 +set JAVA_EXE=java.exe
  23 +%JAVA_EXE% -version >NUL 2>&1
  24 +if "%ERRORLEVEL%" == "0" goto init
  25 +
  26 +echo.
  27 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
  28 +echo.
  29 +echo Please set the JAVA_HOME variable in your environment to match the
  30 +echo location of your Java installation.
  31 +
  32 +goto fail
  33 +
  34 +:findJavaFromJavaHome
  35 +set JAVA_HOME=%JAVA_HOME:"=%
  36 +set JAVA_EXE=%JAVA_HOME%/bin/java.exe
  37 +
  38 +if exist "%JAVA_EXE%" goto init
  39 +
  40 +echo.
  41 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
  42 +echo.
  43 +echo Please set the JAVA_HOME variable in your environment to match the
  44 +echo location of your Java installation.
  45 +
  46 +goto fail
  47 +
  48 +:init
  49 +@rem Get command-line arguments, handling Windowz variants
  50 +
  51 +if not "%OS%" == "Windows_NT" goto win9xME_args
  52 +if "%@eval[2+2]" == "4" goto 4NT_args
  53 +
  54 +:win9xME_args
  55 +@rem Slurp the command line arguments.
  56 +set CMD_LINE_ARGS=
  57 +set _SKIP=2
  58 +
  59 +:win9xME_args_slurp
  60 +if "x%~1" == "x" goto execute
  61 +
  62 +set CMD_LINE_ARGS=%*
  63 +goto execute
  64 +
  65 +:4NT_args
  66 +@rem Get arguments from the 4NT Shell from JP Software
  67 +set CMD_LINE_ARGS=%$
  68 +
  69 +:execute
  70 +@rem Setup the command line
  71 +
  72 +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
  73 +
  74 +@rem Execute Gradle
  75 +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
  76 +
  77 +:end
  78 +@rem End local scope for the variables with windows NT shell
  79 +if "%ERRORLEVEL%"=="0" goto mainEnd
  80 +
  81 +:fail
  82 +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
  83 +rem the _cmd.exe /c_ return code!
  84 +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
  85 +exit /b 1
  86 +
  87 +:mainEnd
  88 +if "%OS%"=="Windows_NT" endlocal
  89 +
  90 +:omega
  1 +sdk.dir=/home/jonny/Android/Sdk
  2 +flutter.sdk=/opt/flutter
  3 +flutter.buildMode=profile
  1 +include ':app'
  2 +
  3 +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
  4 +
  5 +def plugins = new Properties()
  6 +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
  7 +if (pluginsFile.exists()) {
  8 + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
  9 +}
  10 +
  11 +plugins.each { name, path ->
  12 + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
  13 + include ":$name"
  14 + project(":$name").projectDir = pluginDirectory
  15 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>App</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>io.flutter.flutter.app</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundleName</key>
  14 + <string>App</string>
  15 + <key>CFBundlePackageType</key>
  16 + <string>FMWK</string>
  17 + <key>CFBundleShortVersionString</key>
  18 + <string>1.0</string>
  19 + <key>CFBundleSignature</key>
  20 + <string>????</string>
  21 + <key>CFBundleVersion</key>
  22 + <string>1.0</string>
  23 + <key>MinimumOSVersion</key>
  24 + <string>8.0</string>
  25 +</dict>
  26 +</plist>
  1 +#include "Generated.xcconfig"
  1 +#include "Generated.xcconfig"
  1 +// !$*UTF8*$!
  2 +{
  3 + archiveVersion = 1;
  4 + classes = {
  5 + };
  6 + objectVersion = 46;
  7 + objects = {
  8 +
  9 +/* Begin PBXBuildFile section */
  10 + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
  11 + 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
  12 + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
  13 + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
  14 + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  15 + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
  16 + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  17 + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
  18 + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
  19 + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
  20 + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
  21 + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
  22 + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
  23 + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
  24 +/* End PBXBuildFile section */
  25 +
  26 +/* Begin PBXCopyFilesBuildPhase section */
  27 + 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
  28 + isa = PBXCopyFilesBuildPhase;
  29 + buildActionMask = 2147483647;
  30 + dstPath = "";
  31 + dstSubfolderSpec = 10;
  32 + files = (
  33 + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
  34 + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
  35 + );
  36 + name = "Embed Frameworks";
  37 + runOnlyForDeploymentPostprocessing = 0;
  38 + };
  39 +/* End PBXCopyFilesBuildPhase section */
  40 +
  41 +/* Begin PBXFileReference section */
  42 + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
  43 + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
  44 + 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
  45 + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
  46 + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
  47 + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
  48 + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
  49 + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
  50 + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
  51 + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
  52 + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
  53 + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
  54 + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  55 + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
  56 + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
  57 + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
  58 + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  59 +/* End PBXFileReference section */
  60 +
  61 +/* Begin PBXFrameworksBuildPhase section */
  62 + 97C146EB1CF9000F007C117D /* Frameworks */ = {
  63 + isa = PBXFrameworksBuildPhase;
  64 + buildActionMask = 2147483647;
  65 + files = (
  66 + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
  67 + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
  68 + );
  69 + runOnlyForDeploymentPostprocessing = 0;
  70 + };
  71 +/* End PBXFrameworksBuildPhase section */
  72 +
  73 +/* Begin PBXGroup section */
  74 + 9740EEB11CF90186004384FC /* Flutter */ = {
  75 + isa = PBXGroup;
  76 + children = (
  77 + 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
  78 + 3B80C3931E831B6300D905FE /* App.framework */,
  79 + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
  80 + 9740EEBA1CF902C7004384FC /* Flutter.framework */,
  81 + 9740EEB21CF90195004384FC /* Debug.xcconfig */,
  82 + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
  83 + 9740EEB31CF90195004384FC /* Generated.xcconfig */,
  84 + );
  85 + name = Flutter;
  86 + sourceTree = "<group>";
  87 + };
  88 + 97C146E51CF9000F007C117D = {
  89 + isa = PBXGroup;
  90 + children = (
  91 + 9740EEB11CF90186004384FC /* Flutter */,
  92 + 97C146F01CF9000F007C117D /* Runner */,
  93 + 97C146EF1CF9000F007C117D /* Products */,
  94 + CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
  95 + );
  96 + sourceTree = "<group>";
  97 + };
  98 + 97C146EF1CF9000F007C117D /* Products */ = {
  99 + isa = PBXGroup;
  100 + children = (
  101 + 97C146EE1CF9000F007C117D /* Runner.app */,
  102 + );
  103 + name = Products;
  104 + sourceTree = "<group>";
  105 + };
  106 + 97C146F01CF9000F007C117D /* Runner */ = {
  107 + isa = PBXGroup;
  108 + children = (
  109 + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
  110 + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
  111 + 97C146FA1CF9000F007C117D /* Main.storyboard */,
  112 + 97C146FD1CF9000F007C117D /* Assets.xcassets */,
  113 + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
  114 + 97C147021CF9000F007C117D /* Info.plist */,
  115 + 97C146F11CF9000F007C117D /* Supporting Files */,
  116 + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
  117 + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
  118 + );
  119 + path = Runner;
  120 + sourceTree = "<group>";
  121 + };
  122 + 97C146F11CF9000F007C117D /* Supporting Files */ = {
  123 + isa = PBXGroup;
  124 + children = (
  125 + 97C146F21CF9000F007C117D /* main.m */,
  126 + );
  127 + name = "Supporting Files";
  128 + sourceTree = "<group>";
  129 + };
  130 +/* End PBXGroup section */
  131 +
  132 +/* Begin PBXNativeTarget section */
  133 + 97C146ED1CF9000F007C117D /* Runner */ = {
  134 + isa = PBXNativeTarget;
  135 + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
  136 + buildPhases = (
  137 + 9740EEB61CF901F6004384FC /* Run Script */,
  138 + 97C146EA1CF9000F007C117D /* Sources */,
  139 + 97C146EB1CF9000F007C117D /* Frameworks */,
  140 + 97C146EC1CF9000F007C117D /* Resources */,
  141 + 9705A1C41CF9048500538489 /* Embed Frameworks */,
  142 + 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
  143 + );
  144 + buildRules = (
  145 + );
  146 + dependencies = (
  147 + );
  148 + name = Runner;
  149 + productName = Runner;
  150 + productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
  151 + productType = "com.apple.product-type.application";
  152 + };
  153 +/* End PBXNativeTarget section */
  154 +
  155 +/* Begin PBXProject section */
  156 + 97C146E61CF9000F007C117D /* Project object */ = {
  157 + isa = PBXProject;
  158 + attributes = {
  159 + LastUpgradeCheck = 0910;
  160 + ORGANIZATIONNAME = "The Chromium Authors";
  161 + TargetAttributes = {
  162 + 97C146ED1CF9000F007C117D = {
  163 + CreatedOnToolsVersion = 7.3.1;
  164 + };
  165 + };
  166 + };
  167 + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
  168 + compatibilityVersion = "Xcode 3.2";
  169 + developmentRegion = English;
  170 + hasScannedForEncodings = 0;
  171 + knownRegions = (
  172 + en,
  173 + Base,
  174 + );
  175 + mainGroup = 97C146E51CF9000F007C117D;
  176 + productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
  177 + projectDirPath = "";
  178 + projectRoot = "";
  179 + targets = (
  180 + 97C146ED1CF9000F007C117D /* Runner */,
  181 + );
  182 + };
  183 +/* End PBXProject section */
  184 +
  185 +/* Begin PBXResourcesBuildPhase section */
  186 + 97C146EC1CF9000F007C117D /* Resources */ = {
  187 + isa = PBXResourcesBuildPhase;
  188 + buildActionMask = 2147483647;
  189 + files = (
  190 + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
  191 + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
  192 + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
  193 + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
  194 + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
  195 + 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
  196 + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
  197 + );
  198 + runOnlyForDeploymentPostprocessing = 0;
  199 + };
  200 +/* End PBXResourcesBuildPhase section */
  201 +
  202 +/* Begin PBXShellScriptBuildPhase section */
  203 + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
  204 + isa = PBXShellScriptBuildPhase;
  205 + buildActionMask = 2147483647;
  206 + files = (
  207 + );
  208 + inputPaths = (
  209 + );
  210 + name = "Thin Binary";
  211 + outputPaths = (
  212 + );
  213 + runOnlyForDeploymentPostprocessing = 0;
  214 + shellPath = /bin/sh;
  215 + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
  216 + };
  217 + 9740EEB61CF901F6004384FC /* Run Script */ = {
  218 + isa = PBXShellScriptBuildPhase;
  219 + buildActionMask = 2147483647;
  220 + files = (
  221 + );
  222 + inputPaths = (
  223 + );
  224 + name = "Run Script";
  225 + outputPaths = (
  226 + );
  227 + runOnlyForDeploymentPostprocessing = 0;
  228 + shellPath = /bin/sh;
  229 + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
  230 + };
  231 +/* End PBXShellScriptBuildPhase section */
  232 +
  233 +/* Begin PBXSourcesBuildPhase section */
  234 + 97C146EA1CF9000F007C117D /* Sources */ = {
  235 + isa = PBXSourcesBuildPhase;
  236 + buildActionMask = 2147483647;
  237 + files = (
  238 + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
  239 + 97C146F31CF9000F007C117D /* main.m in Sources */,
  240 + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
  241 + );
  242 + runOnlyForDeploymentPostprocessing = 0;
  243 + };
  244 +/* End PBXSourcesBuildPhase section */
  245 +
  246 +/* Begin PBXVariantGroup section */
  247 + 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
  248 + isa = PBXVariantGroup;
  249 + children = (
  250 + 97C146FB1CF9000F007C117D /* Base */,
  251 + );
  252 + name = Main.storyboard;
  253 + sourceTree = "<group>";
  254 + };
  255 + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
  256 + isa = PBXVariantGroup;
  257 + children = (
  258 + 97C147001CF9000F007C117D /* Base */,
  259 + );
  260 + name = LaunchScreen.storyboard;
  261 + sourceTree = "<group>";
  262 + };
  263 +/* End PBXVariantGroup section */
  264 +
  265 +/* Begin XCBuildConfiguration section */
  266 + 97C147031CF9000F007C117D /* Debug */ = {
  267 + isa = XCBuildConfiguration;
  268 + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
  269 + buildSettings = {
  270 + ALWAYS_SEARCH_USER_PATHS = NO;
  271 + CLANG_ANALYZER_NONNULL = YES;
  272 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  273 + CLANG_CXX_LIBRARY = "libc++";
  274 + CLANG_ENABLE_MODULES = YES;
  275 + CLANG_ENABLE_OBJC_ARC = YES;
  276 + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
  277 + CLANG_WARN_BOOL_CONVERSION = YES;
  278 + CLANG_WARN_COMMA = YES;
  279 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  280 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  281 + CLANG_WARN_EMPTY_BODY = YES;
  282 + CLANG_WARN_ENUM_CONVERSION = YES;
  283 + CLANG_WARN_INFINITE_RECURSION = YES;
  284 + CLANG_WARN_INT_CONVERSION = YES;
  285 + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
  286 + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
  287 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  288 + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
  289 + CLANG_WARN_STRICT_PROTOTYPES = YES;
  290 + CLANG_WARN_SUSPICIOUS_MOVE = YES;
  291 + CLANG_WARN_UNREACHABLE_CODE = YES;
  292 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  293 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  294 + COPY_PHASE_STRIP = NO;
  295 + DEBUG_INFORMATION_FORMAT = dwarf;
  296 + ENABLE_STRICT_OBJC_MSGSEND = YES;
  297 + ENABLE_TESTABILITY = YES;
  298 + GCC_C_LANGUAGE_STANDARD = gnu99;
  299 + GCC_DYNAMIC_NO_PIC = NO;
  300 + GCC_NO_COMMON_BLOCKS = YES;
  301 + GCC_OPTIMIZATION_LEVEL = 0;
  302 + GCC_PREPROCESSOR_DEFINITIONS = (
  303 + "DEBUG=1",
  304 + "$(inherited)",
  305 + );
  306 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  307 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  308 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  309 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  310 + GCC_WARN_UNUSED_FUNCTION = YES;
  311 + GCC_WARN_UNUSED_VARIABLE = YES;
  312 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
  313 + MTL_ENABLE_DEBUG_INFO = YES;
  314 + ONLY_ACTIVE_ARCH = YES;
  315 + SDKROOT = iphoneos;
  316 + TARGETED_DEVICE_FAMILY = "1,2";
  317 + };
  318 + name = Debug;
  319 + };
  320 + 97C147041CF9000F007C117D /* Release */ = {
  321 + isa = XCBuildConfiguration;
  322 + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
  323 + buildSettings = {
  324 + ALWAYS_SEARCH_USER_PATHS = NO;
  325 + CLANG_ANALYZER_NONNULL = YES;
  326 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  327 + CLANG_CXX_LIBRARY = "libc++";
  328 + CLANG_ENABLE_MODULES = YES;
  329 + CLANG_ENABLE_OBJC_ARC = YES;
  330 + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
  331 + CLANG_WARN_BOOL_CONVERSION = YES;
  332 + CLANG_WARN_COMMA = YES;
  333 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  334 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  335 + CLANG_WARN_EMPTY_BODY = YES;
  336 + CLANG_WARN_ENUM_CONVERSION = YES;
  337 + CLANG_WARN_INFINITE_RECURSION = YES;
  338 + CLANG_WARN_INT_CONVERSION = YES;
  339 + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
  340 + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
  341 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  342 + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
  343 + CLANG_WARN_STRICT_PROTOTYPES = YES;
  344 + CLANG_WARN_SUSPICIOUS_MOVE = YES;
  345 + CLANG_WARN_UNREACHABLE_CODE = YES;
  346 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  347 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  348 + COPY_PHASE_STRIP = NO;
  349 + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
  350 + ENABLE_NS_ASSERTIONS = NO;
  351 + ENABLE_STRICT_OBJC_MSGSEND = YES;
  352 + GCC_C_LANGUAGE_STANDARD = gnu99;
  353 + GCC_NO_COMMON_BLOCKS = YES;
  354 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  355 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  356 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  357 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  358 + GCC_WARN_UNUSED_FUNCTION = YES;
  359 + GCC_WARN_UNUSED_VARIABLE = YES;
  360 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
  361 + MTL_ENABLE_DEBUG_INFO = NO;
  362 + SDKROOT = iphoneos;
  363 + TARGETED_DEVICE_FAMILY = "1,2";
  364 + VALIDATE_PRODUCT = YES;
  365 + };
  366 + name = Release;
  367 + };
  368 + 97C147061CF9000F007C117D /* Debug */ = {
  369 + isa = XCBuildConfiguration;
  370 + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
  371 + buildSettings = {
  372 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  373 + CURRENT_PROJECT_VERSION = 1;
  374 + ENABLE_BITCODE = NO;
  375 + FRAMEWORK_SEARCH_PATHS = (
  376 + "$(inherited)",
  377 + "$(PROJECT_DIR)/Flutter",
  378 + );
  379 + INFOPLIST_FILE = Runner/Info.plist;
  380 + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  381 + LIBRARY_SEARCH_PATHS = (
  382 + "$(inherited)",
  383 + "$(PROJECT_DIR)/Flutter",
  384 + );
  385 + PRODUCT_BUNDLE_IDENTIFIER = de.udos.flutterStateManagement;
  386 + PRODUCT_NAME = "$(TARGET_NAME)";
  387 + VERSIONING_SYSTEM = "apple-generic";
  388 + };
  389 + name = Debug;
  390 + };
  391 + 97C147071CF9000F007C117D /* Release */ = {
  392 + isa = XCBuildConfiguration;
  393 + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
  394 + buildSettings = {
  395 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  396 + CURRENT_PROJECT_VERSION = 1;
  397 + ENABLE_BITCODE = NO;
  398 + FRAMEWORK_SEARCH_PATHS = (
  399 + "$(inherited)",
  400 + "$(PROJECT_DIR)/Flutter",
  401 + );
  402 + INFOPLIST_FILE = Runner/Info.plist;
  403 + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  404 + LIBRARY_SEARCH_PATHS = (
  405 + "$(inherited)",
  406 + "$(PROJECT_DIR)/Flutter",
  407 + );
  408 + PRODUCT_BUNDLE_IDENTIFIER = de.udos.flutterStateManagement;
  409 + PRODUCT_NAME = "$(TARGET_NAME)";
  410 + VERSIONING_SYSTEM = "apple-generic";
  411 + };
  412 + name = Release;
  413 + };
  414 +/* End XCBuildConfiguration section */
  415 +
  416 +/* Begin XCConfigurationList section */
  417 + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
  418 + isa = XCConfigurationList;
  419 + buildConfigurations = (
  420 + 97C147031CF9000F007C117D /* Debug */,
  421 + 97C147041CF9000F007C117D /* Release */,
  422 + );
  423 + defaultConfigurationIsVisible = 0;
  424 + defaultConfigurationName = Release;
  425 + };
  426 + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
  427 + isa = XCConfigurationList;
  428 + buildConfigurations = (
  429 + 97C147061CF9000F007C117D /* Debug */,
  430 + 97C147071CF9000F007C117D /* Release */,
  431 + );
  432 + defaultConfigurationIsVisible = 0;
  433 + defaultConfigurationName = Release;
  434 + };
  435 +/* End XCConfigurationList section */
  436 + };
  437 + rootObject = 97C146E61CF9000F007C117D /* Project object */;
  438 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "group:Runner.xcodeproj">
  6 + </FileRef>
  7 +</Workspace>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>IDEDidComputeMac32BitWarning</key>
  6 + <true/>
  7 +</dict>
  8 +</plist>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>PreviewsEnabled</key>
  6 + <false/>
  7 +</dict>
  8 +</plist>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + LastUpgradeVersion = "0910"
  4 + version = "1.3">
  5 + <BuildAction
  6 + parallelizeBuildables = "YES"
  7 + buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  18 + BuildableName = "Runner.app"
  19 + BlueprintName = "Runner"
  20 + ReferencedContainer = "container:Runner.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
  24 + </BuildAction>
  25 + <TestAction
  26 + buildConfiguration = "Debug"
  27 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  28 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  29 + language = ""
  30 + shouldUseLaunchSchemeArgsEnv = "YES">
  31 + <Testables>
  32 + </Testables>
  33 + <MacroExpansion>
  34 + <BuildableReference
  35 + BuildableIdentifier = "primary"
  36 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  37 + BuildableName = "Runner.app"
  38 + BlueprintName = "Runner"
  39 + ReferencedContainer = "container:Runner.xcodeproj">
  40 + </BuildableReference>
  41 + </MacroExpansion>
  42 + <AdditionalOptions>
  43 + </AdditionalOptions>
  44 + </TestAction>
  45 + <LaunchAction
  46 + buildConfiguration = "Debug"
  47 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  48 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  49 + language = ""
  50 + launchStyle = "0"
  51 + useCustomWorkingDirectory = "NO"
  52 + ignoresPersistentStateOnLaunch = "NO"
  53 + debugDocumentVersioning = "YES"
  54 + debugServiceExtension = "internal"
  55 + allowLocationSimulation = "YES">
  56 + <BuildableProductRunnable
  57 + runnableDebuggingMode = "0">
  58 + <BuildableReference
  59 + BuildableIdentifier = "primary"
  60 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  61 + BuildableName = "Runner.app"
  62 + BlueprintName = "Runner"
  63 + ReferencedContainer = "container:Runner.xcodeproj">
  64 + </BuildableReference>
  65 + </BuildableProductRunnable>
  66 + <AdditionalOptions>
  67 + </AdditionalOptions>
  68 + </LaunchAction>
  69 + <ProfileAction
  70 + buildConfiguration = "Release"
  71 + shouldUseLaunchSchemeArgsEnv = "YES"
  72 + savedToolIdentifier = ""
  73 + useCustomWorkingDirectory = "NO"
  74 + debugDocumentVersioning = "YES">
  75 + <BuildableProductRunnable
  76 + runnableDebuggingMode = "0">
  77 + <BuildableReference
  78 + BuildableIdentifier = "primary"
  79 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  80 + BuildableName = "Runner.app"
  81 + BlueprintName = "Runner"
  82 + ReferencedContainer = "container:Runner.xcodeproj">
  83 + </BuildableReference>
  84 + </BuildableProductRunnable>
  85 + </ProfileAction>
  86 + <AnalyzeAction
  87 + buildConfiguration = "Debug">
  88 + </AnalyzeAction>
  89 + <ArchiveAction
  90 + buildConfiguration = "Release"
  91 + revealArchiveInOrganizer = "YES">
  92 + </ArchiveAction>
  93 +</Scheme>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "group:Runner.xcodeproj">
  6 + </FileRef>
  7 +</Workspace>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>IDEDidComputeMac32BitWarning</key>
  6 + <true/>
  7 +</dict>
  8 +</plist>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>PreviewsEnabled</key>
  6 + <false/>
  7 +</dict>
  8 +</plist>
  1 +#import <Flutter/Flutter.h>
  2 +#import <UIKit/UIKit.h>
  3 +
  4 +@interface AppDelegate : FlutterAppDelegate
  5 +
  6 +@end
  1 +#include "AppDelegate.h"
  2 +#include "GeneratedPluginRegistrant.h"
  3 +
  4 +@implementation AppDelegate
  5 +
  6 +- (BOOL)application:(UIApplication *)application
  7 + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  8 + [GeneratedPluginRegistrant registerWithRegistry:self];
  9 + // Override point for customization after application launch.
  10 + return [super application:application didFinishLaunchingWithOptions:launchOptions];
  11 +}
  12 +
  13 +@end
  1 +import UIKit
  2 +import Flutter
  3 +
  4 +@UIApplicationMain
  5 +@objc class AppDelegate: FlutterAppDelegate {
  6 + override func application(
  7 + _ application: UIApplication,
  8 + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  9 + ) -> Bool {
  10 + GeneratedPluginRegistrant.register(with: self)
  11 + return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  12 + }
  13 +}
  1 +{
  2 + "images" : [
  3 + {
  4 + "size" : "20x20",
  5 + "idiom" : "iphone",
  6 + "filename" : "Icon-App-20x20@2x.png",
  7 + "scale" : "2x"
  8 + },
  9 + {
  10 + "size" : "20x20",
  11 + "idiom" : "iphone",
  12 + "filename" : "Icon-App-20x20@3x.png",
  13 + "scale" : "3x"
  14 + },
  15 + {
  16 + "size" : "29x29",
  17 + "idiom" : "iphone",
  18 + "filename" : "Icon-App-29x29@1x.png",
  19 + "scale" : "1x"
  20 + },
  21 + {
  22 + "size" : "29x29",
  23 + "idiom" : "iphone",
  24 + "filename" : "Icon-App-29x29@2x.png",
  25 + "scale" : "2x"
  26 + },
  27 + {
  28 + "size" : "29x29",
  29 + "idiom" : "iphone",
  30 + "filename" : "Icon-App-29x29@3x.png",
  31 + "scale" : "3x"
  32 + },
  33 + {
  34 + "size" : "40x40",
  35 + "idiom" : "iphone",
  36 + "filename" : "Icon-App-40x40@2x.png",
  37 + "scale" : "2x"
  38 + },
  39 + {
  40 + "size" : "40x40",
  41 + "idiom" : "iphone",
  42 + "filename" : "Icon-App-40x40@3x.png",
  43 + "scale" : "3x"
  44 + },
  45 + {
  46 + "size" : "60x60",
  47 + "idiom" : "iphone",
  48 + "filename" : "Icon-App-60x60@2x.png",
  49 + "scale" : "2x"
  50 + },
  51 + {
  52 + "size" : "60x60",
  53 + "idiom" : "iphone",
  54 + "filename" : "Icon-App-60x60@3x.png",
  55 + "scale" : "3x"
  56 + },
  57 + {
  58 + "size" : "20x20",
  59 + "idiom" : "ipad",
  60 + "filename" : "Icon-App-20x20@1x.png",
  61 + "scale" : "1x"
  62 + },
  63 + {
  64 + "size" : "20x20",
  65 + "idiom" : "ipad",
  66 + "filename" : "Icon-App-20x20@2x.png",
  67 + "scale" : "2x"
  68 + },
  69 + {
  70 + "size" : "29x29",
  71 + "idiom" : "ipad",
  72 + "filename" : "Icon-App-29x29@1x.png",
  73 + "scale" : "1x"
  74 + },
  75 + {
  76 + "size" : "29x29",
  77 + "idiom" : "ipad",
  78 + "filename" : "Icon-App-29x29@2x.png",
  79 + "scale" : "2x"
  80 + },
  81 + {
  82 + "size" : "40x40",
  83 + "idiom" : "ipad",
  84 + "filename" : "Icon-App-40x40@1x.png",
  85 + "scale" : "1x"
  86 + },
  87 + {
  88 + "size" : "40x40",
  89 + "idiom" : "ipad",
  90 + "filename" : "Icon-App-40x40@2x.png",
  91 + "scale" : "2x"
  92 + },
  93 + {
  94 + "size" : "76x76",
  95 + "idiom" : "ipad",
  96 + "filename" : "Icon-App-76x76@1x.png",
  97 + "scale" : "1x"
  98 + },
  99 + {
  100 + "size" : "76x76",
  101 + "idiom" : "ipad",
  102 + "filename" : "Icon-App-76x76@2x.png",
  103 + "scale" : "2x"
  104 + },
  105 + {
  106 + "size" : "83.5x83.5",
  107 + "idiom" : "ipad",
  108 + "filename" : "Icon-App-83.5x83.5@2x.png",
  109 + "scale" : "2x"
  110 + },
  111 + {
  112 + "size" : "1024x1024",
  113 + "idiom" : "ios-marketing",
  114 + "filename" : "Icon-App-1024x1024@1x.png",
  115 + "scale" : "1x"
  116 + }
  117 + ],
  118 + "info" : {
  119 + "version" : 1,
  120 + "author" : "xcode"
  121 + }
  122 +}
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "LaunchImage.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "LaunchImage@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "LaunchImage@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
  1 +# Launch Screen Assets
  2 +
  3 +You can customize the launch screen with your own desired assets by replacing the image files in this directory.
  4 +
  5 +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
  3 + <dependencies>
  4 + <deployment identifier="iOS"/>
  5 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
  6 + </dependencies>
  7 + <scenes>
  8 + <!--View Controller-->
  9 + <scene sceneID="EHf-IW-A2E">
  10 + <objects>
  11 + <viewController id="01J-lp-oVM" sceneMemberID="viewController">
  12 + <layoutGuides>
  13 + <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
  14 + <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
  15 + </layoutGuides>
  16 + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
  17 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  18 + <subviews>
  19 + <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
  20 + </imageView>
  21 + </subviews>
  22 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  23 + <constraints>
  24 + <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
  25 + <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
  26 + </constraints>
  27 + </view>
  28 + </viewController>
  29 + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
  30 + </objects>
  31 + <point key="canvasLocation" x="53" y="375"/>
  32 + </scene>
  33 + </scenes>
  34 + <resources>
  35 + <image name="LaunchImage" width="168" height="185"/>
  36 + </resources>
  37 +</document>
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
  3 + <dependencies>
  4 + <deployment identifier="iOS"/>
  5 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
  6 + </dependencies>
  7 + <scenes>
  8 + <!--Flutter View Controller-->
  9 + <scene sceneID="tne-QT-ifu">
  10 + <objects>
  11 + <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
  12 + <layoutGuides>
  13 + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
  14 + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
  15 + </layoutGuides>
  16 + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
  17 + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
  18 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  19 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
  20 + </view>
  21 + </viewController>
  22 + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
  23 + </objects>
  24 + </scene>
  25 + </scenes>
  26 +</document>
  1 +//
  2 +// Generated file. Do not edit.
  3 +//
  4 +
  5 +#ifndef GeneratedPluginRegistrant_h
  6 +#define GeneratedPluginRegistrant_h
  7 +
  8 +#import <Flutter/Flutter.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface GeneratedPluginRegistrant : NSObject
  13 ++ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
  17 +#endif /* GeneratedPluginRegistrant_h */
  1 +//
  2 +// Generated file. Do not edit.
  3 +//
  4 +
  5 +#import "GeneratedPluginRegistrant.h"
  6 +
  7 +@implementation GeneratedPluginRegistrant
  8 +
  9 ++ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  10 +}
  11 +
  12 +@end
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>$(EXECUTABLE_NAME)</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundleName</key>
  14 + <string>benckmark</string>
  15 + <key>CFBundlePackageType</key>
  16 + <string>APPL</string>
  17 + <key>CFBundleShortVersionString</key>
  18 + <string>1.0</string>
  19 + <key>CFBundleSignature</key>
  20 + <string>????</string>
  21 + <key>CFBundleVersion</key>
  22 + <string>1</string>
  23 + <key>LSRequiresIPhoneOS</key>
  24 + <true/>
  25 + <key>UILaunchStoryboardName</key>
  26 + <string>LaunchScreen</string>
  27 + <key>UIMainStoryboardFile</key>
  28 + <string>Main</string>
  29 + <key>UISupportedInterfaceOrientations</key>
  30 + <array>
  31 + <string>UIInterfaceOrientationPortrait</string>
  32 + <string>UIInterfaceOrientationLandscapeLeft</string>
  33 + <string>UIInterfaceOrientationLandscapeRight</string>
  34 + </array>
  35 + <key>UISupportedInterfaceOrientations~ipad</key>
  36 + <array>
  37 + <string>UIInterfaceOrientationPortrait</string>
  38 + <string>UIInterfaceOrientationPortraitUpsideDown</string>
  39 + <string>UIInterfaceOrientationLandscapeLeft</string>
  40 + <string>UIInterfaceOrientationLandscapeRight</string>
  41 + </array>
  42 + <key>UIViewControllerBasedStatusBarAppearance</key>
  43 + <false/>
  44 +</dict>
  45 +</plist>
  1 +#import "GeneratedPluginRegistrant.h"
  1 +#import <Flutter/Flutter.h>
  2 +#import <UIKit/UIKit.h>
  3 +#import "AppDelegate.h"
  4 +
  5 +int main(int argc, char* argv[]) {
  6 + @autoreleasepool {
  7 + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  8 + }
  9 +}
  1 +import 'package:benckmark/_bloc_lib/_shared/entitity.dart';
  2 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  3 +
  4 +import 'items.events.dart';
  5 +import 'items.state.dart';
  6 +
  7 +class ItemsBloc extends EntityBloc<EntityEvent, ItemsState> {
  8 + @override
  9 + ItemsState get initialState => ItemsState(sampleItems);
  10 +
  11 + @override
  12 + Stream<ItemsState> mapEventToState(EntityEvent event) async* {
  13 + if (event is AddItemEvent) {
  14 + final List<Item> items = List.from(state.entities)..add(event.item);
  15 +
  16 + yield ItemsState(items);
  17 + } else if (event is AddItemsEvent) {
  18 + final List<Item> items = List.from(state.entities)..addAll(event.items);
  19 +
  20 + yield ItemsState(items);
  21 + } else if (event is RemoveItemsEvent) {
  22 + final List<Item> items = List.from(state.entities);
  23 +
  24 + items.removeWhere((item) => event.itemIds.contains(item.id));
  25 +
  26 + yield ItemsState(items);
  27 + }
  28 + }
  29 +}
  1 +import 'package:benckmark/_bloc_lib/_shared/entitity.dart';
  2 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  3 +
  4 +class AddItemEvent extends EntityEvent<Item> {
  5 + final Item item;
  6 +
  7 + AddItemEvent(this.item);
  8 +
  9 + @override
  10 + List<Object> get props => [item];
  11 +}
  12 +
  13 +class AddItemsEvent extends EntityEvent<Item> {
  14 + final List<Item> items;
  15 +
  16 + AddItemsEvent(this.items);
  17 +
  18 + @override
  19 + List<Object> get props => [items];
  20 +}
  21 +
  22 +class RemoveItemsEvent extends EntityEvent<Item> {
  23 + final List<String> itemIds;
  24 +
  25 + RemoveItemsEvent(this.itemIds);
  26 +
  27 + @override
  28 + List<Object> get props => [itemIds];
  29 +}
  1 +import 'package:benckmark/_bloc_lib/_shared/entitity.dart';
  2 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  3 +
  4 +class ItemsState extends EntityState<Item> {
  5 + ItemsState([List<Item> items = const []]) : super(items);
  6 +}
  1 +import 'package:bloc/bloc.dart';
  2 +import 'package:equatable/equatable.dart';
  3 +import 'package:meta/meta.dart';
  4 +import 'package:uuid/uuid.dart';
  5 +
  6 +@immutable
  7 +class Entity extends Equatable {
  8 + final String id;
  9 +
  10 + Entity([String id]) : this.id = id ?? Uuid().v4();
  11 +
  12 + @override
  13 + List<Object> get props => [id];
  14 +}
  15 +
  16 +@immutable
  17 +abstract class EntityEvent<E extends Entity> extends Equatable {}
  18 +
  19 +@immutable
  20 +class EntityState<E extends Entity> extends Equatable {
  21 + final Map<String, E> dictionary;
  22 + final List<String> ids;
  23 + final List<E> entities;
  24 +
  25 + EntityState([this.entities = const []])
  26 + : dictionary = Map.fromIterable(entities,
  27 + key: (entity) => entity.id, value: (entity) => entity),
  28 + ids = List.from(entities.map((entity) => entity.id));
  29 +
  30 + @override
  31 + List<Object> get props => [dictionary, ids, entities];
  32 +}
  33 +
  34 +abstract class EntityBloc<Event extends EntityEvent, State extends EntityState>
  35 + extends Bloc<Event, State> {}
  1 +import 'package:meta/meta.dart';
  2 +
  3 +import 'entitity.dart';
  4 +
  5 +@immutable
  6 +class Item extends Entity {
  7 + final String title;
  8 +
  9 + Item({String id, this.title}) : super();
  10 +
  11 + @override
  12 + List<Object> get props => super.props..addAll([id, title]);
  13 +}
  14 +
  15 +final List<Item> sampleItems = [
  16 + Item(title: 'Item 1'),
  17 + Item(title: 'Item 2'),
  18 + Item(title: 'Item 3')
  19 +];
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_bloc/flutter_bloc.dart';
  3 +import 'package:benckmark/_bloc_lib/_blocs/items/items.bloc.dart';
  4 +import 'package:benckmark/_bloc_lib/_blocs/items/items.events.dart';
  5 +import 'package:benckmark/_bloc_lib/_blocs/items/items.state.dart';
  6 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  7 +
  8 +class App extends StatelessWidget {
  9 + Widget build(BuildContext context) {
  10 + return MultiBlocProvider(
  11 + providers: [
  12 + BlocProvider<ItemsBloc>(
  13 + create: (context) => ItemsBloc(),
  14 + ),
  15 + ],
  16 + child: MaterialApp(
  17 + title: 'BLoC Lib Sample',
  18 + theme: ThemeData(
  19 + primarySwatch: Colors.blue,
  20 + ),
  21 + home: Page(
  22 + title: 'BLoC Lib Sample',
  23 + ),
  24 + ),
  25 + );
  26 + }
  27 +}
  28 +
  29 +class Page extends StatefulWidget {
  30 + Page({
  31 + Key key,
  32 + this.title,
  33 + }) : super(key: key);
  34 +
  35 + final String title;
  36 +
  37 + @override
  38 + _PageState createState() => _PageState();
  39 +}
  40 +
  41 +class _PageState extends State<Page> {
  42 + @override
  43 + void initState() {
  44 + fill();
  45 + super.initState();
  46 + }
  47 +
  48 + fill() async {
  49 + for (int i = 0; i < 10; i++) {
  50 + await Future.delayed(Duration(milliseconds: 500));
  51 + BlocProvider.of<ItemsBloc>(context)
  52 + .add(AddItemEvent(Item(title: DateTime.now().toString())));
  53 + }
  54 + print("It's done. Print now!");
  55 + }
  56 +
  57 + @override
  58 + Widget build(BuildContext context) {
  59 + return Scaffold(
  60 + appBar: AppBar(
  61 + title: Text(widget.title),
  62 + ),
  63 + body: ListViewWidget(),
  64 + );
  65 + }
  66 +}
  67 +
  68 +class ListViewWidget extends StatelessWidget {
  69 + @override
  70 + Widget build(BuildContext context) {
  71 + // ignore: close_sinks
  72 + final _itemsBloc = BlocProvider.of<ItemsBloc>(context);
  73 +
  74 + return BlocBuilder<ItemsBloc, ItemsState>(
  75 + bloc: _itemsBloc,
  76 + builder: (context, entityState) {
  77 + return ListView.builder(
  78 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  79 + itemCount: entityState.entities.length,
  80 + itemBuilder: (context, index) {
  81 + final item = entityState.entities[index];
  82 +
  83 + return ListTile(
  84 + title: Text(item.title),
  85 + );
  86 + },
  87 + );
  88 + },
  89 + );
  90 + }
  91 +}
  1 +import 'dart:async';
  2 +
  3 +import 'package:benckmark/item.dart';
  4 +import 'package:rxdart/rxdart.dart';
  5 +
  6 +class AddItemEvent {
  7 + final Item item;
  8 +
  9 + AddItemEvent(this.item);
  10 +}
  11 +
  12 +class ItemsBloc {
  13 + final StreamController<dynamic> _itemsEventController = StreamController();
  14 +
  15 + StreamSink<dynamic> get _itemsEventSink => _itemsEventController.sink;
  16 +
  17 + final BehaviorSubject<List<Item>> _itemsStateSubject =
  18 + BehaviorSubject.seeded(sampleItems);
  19 +
  20 + StreamSink<List<Item>> get _itemsStateSink => _itemsStateSubject.sink;
  21 +
  22 + ValueStream<List<Item>> get items => _itemsStateSubject.stream;
  23 +
  24 + List<StreamSubscription<dynamic>> _subscriptions;
  25 +
  26 + ItemsBloc() {
  27 + _subscriptions = <StreamSubscription<dynamic>>[
  28 + _itemsEventController.stream.listen(_mapEventToState)
  29 + ];
  30 + }
  31 +
  32 + dispose() {
  33 + _subscriptions.forEach((subscription) => subscription.cancel());
  34 + _itemsStateSubject.close();
  35 + _itemsEventController.close();
  36 + }
  37 +
  38 + void addItem(Item item) {
  39 + _itemsEventSink.add(AddItemEvent(item));
  40 + }
  41 +
  42 + void _mapEventToState(dynamic event) {
  43 + if (event is AddItemEvent) {
  44 + _itemsStateSink.add([...items.value, event.item]);
  45 + }
  46 + }
  47 +}
  1 +import 'package:flutter/widgets.dart';
  2 +
  3 +import '_bloc.dart';
  4 +
  5 +class ItemsBlocProvider extends InheritedWidget {
  6 + final ItemsBloc bloc;
  7 +
  8 + ItemsBlocProvider({
  9 + Key key,
  10 + Widget child,
  11 + @required this.bloc,
  12 + }) : super(key: key, child: child);
  13 +
  14 + @override
  15 + bool updateShouldNotify(InheritedWidget oldWidget) => true;
  16 +
  17 + static ItemsBloc of(BuildContext context) {
  18 + final provider =
  19 + context.dependOnInheritedWidgetOfExactType<ItemsBlocProvider>();
  20 +
  21 + return provider.bloc;
  22 + }
  23 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter/scheduler.dart';
  3 +import 'package:benckmark/item.dart';
  4 +
  5 +import '_bloc.dart';
  6 +import '_provider.dart';
  7 +
  8 +class App extends StatelessWidget {
  9 + final ItemsBloc itemsBloc = ItemsBloc();
  10 +
  11 + @override
  12 + Widget build(BuildContext context) {
  13 + return ItemsBlocProvider(
  14 + bloc: itemsBloc,
  15 + child: MaterialApp(
  16 + title: 'BLoC Sample',
  17 + theme: ThemeData(
  18 + primarySwatch: Colors.blue,
  19 + ),
  20 + home: Page(title: 'BLoC Sample'),
  21 + ),
  22 + );
  23 + }
  24 +}
  25 +
  26 +class Page extends StatefulWidget {
  27 + Page({Key key, this.title}) : super(key: key);
  28 +
  29 + final String title;
  30 +
  31 + @override
  32 + _PageState createState() => _PageState();
  33 +}
  34 +
  35 +class _PageState extends State<Page> {
  36 + @override
  37 + void initState() {
  38 + SchedulerBinding.instance.addPostFrameCallback((timeStamp) async {
  39 + for (int i = 0; i < 10; i++) {
  40 + await Future.delayed(Duration(milliseconds: 500));
  41 + ItemsBlocProvider.of(context)
  42 + .addItem(Item(title: DateTime.now().toString()));
  43 + }
  44 + print("It's done. Print now!");
  45 + });
  46 +
  47 + super.initState();
  48 + }
  49 +
  50 + @override
  51 + Widget build(BuildContext context) {
  52 + return Scaffold(
  53 + appBar: AppBar(
  54 + title: Text(widget.title),
  55 + ),
  56 + body: ListViewWidget(),
  57 + );
  58 + }
  59 +}
  60 +
  61 +class ListViewWidget extends StatelessWidget {
  62 + @override
  63 + Widget build(BuildContext context) {
  64 + final ItemsBloc itemsBloc = ItemsBlocProvider.of(context);
  65 +
  66 + return StreamBuilder<List<Item>>(
  67 + stream: itemsBloc.items,
  68 + builder: (context, snapshot) {
  69 + final items = snapshot.data;
  70 + return ListView.builder(
  71 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  72 + itemCount: items is List<Item> ? items.length : 0,
  73 + itemBuilder: (context, index) {
  74 + return ListTile(
  75 + title: Text(items[index].title),
  76 + );
  77 + },
  78 + );
  79 + },
  80 + );
  81 + }
  82 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:get/get.dart';
  3 +
  4 +class Controller extends GetController {
  5 + @override
  6 + onInit() async {
  7 + for (int i = 0; i < 10; i++) {
  8 + await Future.delayed(Duration(milliseconds: 500));
  9 + addItem(Item(title: DateTime.now().toString()));
  10 + }
  11 + print("It's done. Print now!");
  12 + super.onInit();
  13 + }
  14 +
  15 + final items = List<Item>.of(sampleItems);
  16 +
  17 + void addItem(Item item) {
  18 + items.add(item);
  19 + update();
  20 + }
  21 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:benckmark/_get/_store.dart';
  3 +import 'package:get/get.dart';
  4 +
  5 +class App extends StatelessWidget {
  6 + @override
  7 + Widget build(BuildContext context) {
  8 + return MaterialApp(
  9 + title: 'Get Sample',
  10 + theme: ThemeData(
  11 + primarySwatch: Colors.blue,
  12 + ),
  13 + home: Page(title: 'Get Sample'),
  14 + );
  15 + }
  16 +}
  17 +
  18 +class Page extends StatelessWidget {
  19 + Page({
  20 + Key key,
  21 + this.title,
  22 + }) : super(key: key);
  23 +
  24 + final String title;
  25 +
  26 + @override
  27 + Widget build(BuildContext context) {
  28 + return Scaffold(
  29 + appBar: AppBar(
  30 + title: Text(title),
  31 + ),
  32 + body: ListViewWidget(),
  33 + );
  34 + }
  35 +}
  36 +
  37 +class ListViewWidget extends StatelessWidget {
  38 + @override
  39 + Widget build(BuildContext context) {
  40 + return GetBuilder<Controller>(
  41 + init: Controller(),
  42 + global: false,
  43 + builder: (_) => ListView.builder(
  44 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  45 + itemCount: _.items.length,
  46 + itemBuilder: (context, index) {
  47 + return ListTile(
  48 + title: Text(_.items[index].title),
  49 + );
  50 + }));
  51 + }
  52 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:get/get.dart';
  3 +
  4 +class Controller extends RxController {
  5 + final items = sampleItems.obs;
  6 +
  7 + @override
  8 + onInit() async {
  9 + for (int i = 0; i < 10; i++) {
  10 + await Future.delayed(Duration(milliseconds: 500));
  11 + addItem(Item(title: DateTime.now().toString()));
  12 + }
  13 +
  14 + print("It's done. Print now!");
  15 + super.onInit();
  16 + }
  17 +
  18 + void addItem(Item item) {
  19 + items.add(item);
  20 + }
  21 +}
  1 +import 'package:benckmark/_get_rx/_store.dart';
  2 +import 'package:flutter/material.dart';
  3 +import 'package:get/get.dart';
  4 +
  5 +class App extends StatelessWidget {
  6 + @override
  7 + Widget build(BuildContext context) {
  8 + return MaterialApp(
  9 + title: 'GetX Sample',
  10 + theme: ThemeData(
  11 + primarySwatch: Colors.blue,
  12 + ),
  13 + home: Page(title: 'GetX Sample'),
  14 + );
  15 + }
  16 +}
  17 +
  18 +Controller c = Controller();
  19 +
  20 +class Page extends StatefulWidget {
  21 + Page({
  22 + Key key,
  23 + this.title,
  24 + }) : super(key: key);
  25 +
  26 + final String title;
  27 +
  28 + @override
  29 + _PageState createState() => _PageState();
  30 +}
  31 +
  32 +class _PageState extends State<Page> {
  33 + @override
  34 + void initState() {
  35 + c.onInit();
  36 + super.initState();
  37 + }
  38 +
  39 + @override
  40 + Widget build(BuildContext context) {
  41 + return Scaffold(
  42 + appBar: AppBar(
  43 + title: Text(widget.title),
  44 + ),
  45 + body: ListViewWidget(),
  46 + );
  47 + }
  48 +}
  49 +
  50 +class ListViewWidget extends StatelessWidget {
  51 + @override
  52 + Widget build(BuildContext context) {
  53 + return Obxx(() => ListView.builder(
  54 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  55 + itemCount: c.items.length,
  56 + itemBuilder: (context, index) {
  57 + return ListTile(
  58 + title: Text(c.items[index].title),
  59 + );
  60 + }));
  61 + }
  62 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:mobx/mobx.dart';
  3 +
  4 +part '_store.g.dart';
  5 +
  6 +class AppStore = _AppStore with _$AppStore;
  7 +
  8 +abstract class _AppStore with Store {
  9 + @observable
  10 + ObservableList<Item> items = ObservableList<Item>.of(sampleItems);
  11 +
  12 + @observable
  13 + ObservableSet<String> checkedItemIds = ObservableSet<String>();
  14 +
  15 + @action
  16 + void addItem(Item item) {
  17 + items.add(item);
  18 + }
  19 +}
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +
  3 +part of '_store.dart';
  4 +
  5 +// **************************************************************************
  6 +// StoreGenerator
  7 +// **************************************************************************
  8 +
  9 +// ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic
  10 +
  11 +mixin _$AppStore on _AppStore, Store {
  12 + final _$itemsAtom = Atom(name: '_AppStore.items');
  13 +
  14 + @override
  15 + ObservableList<Item> get items {
  16 + _$itemsAtom.context.enforceReadPolicy(_$itemsAtom);
  17 + _$itemsAtom.reportObserved();
  18 + return super.items;
  19 + }
  20 +
  21 + @override
  22 + set items(ObservableList<Item> value) {
  23 + _$itemsAtom.context.conditionallyRunInAction(() {
  24 + super.items = value;
  25 + _$itemsAtom.reportChanged();
  26 + }, _$itemsAtom, name: '${_$itemsAtom.name}_set');
  27 + }
  28 +
  29 + final _$checkedItemIdsAtom = Atom(name: '_AppStore.checkedItemIds');
  30 +
  31 + @override
  32 + ObservableSet<String> get checkedItemIds {
  33 + _$checkedItemIdsAtom.context.enforceReadPolicy(_$checkedItemIdsAtom);
  34 + _$checkedItemIdsAtom.reportObserved();
  35 + return super.checkedItemIds;
  36 + }
  37 +
  38 + @override
  39 + set checkedItemIds(ObservableSet<String> value) {
  40 + _$checkedItemIdsAtom.context.conditionallyRunInAction(() {
  41 + super.checkedItemIds = value;
  42 + _$checkedItemIdsAtom.reportChanged();
  43 + }, _$checkedItemIdsAtom, name: '${_$checkedItemIdsAtom.name}_set');
  44 + }
  45 +
  46 + final _$_AppStoreActionController = ActionController(name: '_AppStore');
  47 +
  48 + @override
  49 + void addItem(Item item) {
  50 + final _$actionInfo = _$_AppStoreActionController.startAction();
  51 + try {
  52 + return super.addItem(item);
  53 + } finally {
  54 + _$_AppStoreActionController.endAction(_$actionInfo);
  55 + }
  56 + }
  57 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_mobx/flutter_mobx.dart';
  3 +import 'package:benckmark/_mobx/_store.dart';
  4 +import 'package:benckmark/item.dart';
  5 +
  6 +final store = AppStore();
  7 +
  8 +class App extends StatelessWidget {
  9 + @override
  10 + Widget build(BuildContext context) {
  11 + return MaterialApp(
  12 + title: 'MobX Sample',
  13 + theme: ThemeData(
  14 + primarySwatch: Colors.blue,
  15 + ),
  16 + home: Page(title: 'MobX Sample'),
  17 + );
  18 + }
  19 +}
  20 +
  21 +class Page extends StatefulWidget {
  22 + Page({
  23 + Key key,
  24 + this.title,
  25 + }) : super(key: key);
  26 +
  27 + final String title;
  28 +
  29 + @override
  30 + _PageState createState() => _PageState();
  31 +}
  32 +
  33 +class _PageState extends State<Page> {
  34 + @override
  35 + void initState() {
  36 + fill();
  37 + super.initState();
  38 + }
  39 +
  40 + fill() async {
  41 + for (int i = 0; i < 10; i++) {
  42 + await Future.delayed(Duration(milliseconds: 500));
  43 + store.addItem(Item(title: DateTime.now().toString()));
  44 + }
  45 + print("It's done. Print now!");
  46 + }
  47 +
  48 + @override
  49 + Widget build(BuildContext context) {
  50 + return Scaffold(
  51 + appBar: AppBar(
  52 + title: Text(widget.title),
  53 + ),
  54 + body: ListViewWidget(),
  55 + );
  56 + }
  57 +}
  58 +
  59 +class ListViewWidget extends StatelessWidget {
  60 + @override
  61 + Widget build(BuildContext context) {
  62 + return Observer(
  63 + builder: (_) {
  64 + return ListView.builder(
  65 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  66 + itemCount: store.items.length,
  67 + itemBuilder: (context, index) {
  68 + return ListTile(
  69 + title: Text(store.items[index].title),
  70 + );
  71 + },
  72 + );
  73 + },
  74 + );
  75 + }
  76 +}
  1 +import 'package:flutter/foundation.dart';
  2 +import 'package:benckmark/item.dart';
  3 +
  4 +class AppState with ChangeNotifier {
  5 + List<Item> _items = sampleItems;
  6 +
  7 + List<Item> get items => _items;
  8 +
  9 + void addItem(Item item) {
  10 + _items.add(item);
  11 +
  12 + notifyListeners();
  13 + }
  14 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter/scheduler.dart';
  3 +import 'package:benckmark/item.dart';
  4 +import 'package:provider/provider.dart';
  5 +
  6 +import '_state.dart';
  7 +
  8 +class App extends StatelessWidget {
  9 + @override
  10 + Widget build(BuildContext context) {
  11 + return ChangeNotifierProvider(
  12 + create: (context) => AppState(),
  13 + child: MaterialApp(
  14 + title: 'Provider Sample',
  15 + theme: ThemeData(
  16 + primarySwatch: Colors.blue,
  17 + ),
  18 + home: Page(title: 'Provider Sample'),
  19 + ),
  20 + );
  21 + }
  22 +}
  23 +
  24 +class Page extends StatefulWidget {
  25 + Page({
  26 + Key key,
  27 + this.title,
  28 + }) : super(key: key);
  29 +
  30 + final String title;
  31 +
  32 + @override
  33 + _PageState createState() => _PageState();
  34 +}
  35 +
  36 +class _PageState extends State<Page> {
  37 + @override
  38 + void initState() {
  39 + SchedulerBinding.instance.addPostFrameCallback((timeStamp) async {
  40 + for (int i = 0; i < 10; i++) {
  41 + await Future.delayed(Duration(milliseconds: 500));
  42 + final state = Provider.of<AppState>(context, listen: false);
  43 + state.addItem(Item(title: DateTime.now().toString()));
  44 + }
  45 + print("It's done. Print now!");
  46 + });
  47 + super.initState();
  48 + }
  49 +
  50 + @override
  51 + Widget build(BuildContext context) {
  52 + return Scaffold(
  53 + appBar: AppBar(
  54 + title: Text(widget.title),
  55 + ),
  56 + body: ListViewWidget(),
  57 + );
  58 + }
  59 +}
  60 +
  61 +class ListViewWidget extends StatelessWidget {
  62 + @override
  63 + Widget build(BuildContext context) {
  64 + return Consumer<AppState>(
  65 + builder: (context, state, child) {
  66 + return ListView.builder(
  67 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  68 + itemCount: state.items.length,
  69 + itemBuilder: (context, index) {
  70 + return ListTile(
  71 + title: Text(state.items[index].title),
  72 + );
  73 + },
  74 + );
  75 + },
  76 + );
  77 + }
  78 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:meta/meta.dart';
  3 +
  4 +@immutable
  5 +class AppState {
  6 + final List<Item> items;
  7 +
  8 + AppState({
  9 + this.items,
  10 + });
  11 +
  12 + AppState.initialState() : items = sampleItems;
  13 +}
  14 +
  15 +class AddItemAction {
  16 + Item payload;
  17 +
  18 + AddItemAction({
  19 + this.payload,
  20 + });
  21 +}
  22 +
  23 +AppState appReducer(AppState state, dynamic action) {
  24 + return AppState(items: itemsReducer(state.items, action));
  25 +}
  26 +
  27 +List<Item> itemsReducer(List<Item> state, dynamic action) {
  28 + if (action is AddItemAction) {
  29 + return [...state, action.payload];
  30 + }
  31 +
  32 + return state;
  33 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_redux/flutter_redux.dart';
  3 +import 'package:benckmark/item.dart';
  4 +import 'package:redux/redux.dart';
  5 +import '_store.dart';
  6 +
  7 +final store =
  8 + Store<AppState>(appReducer, initialState: AppState.initialState());
  9 +
  10 +class App extends StatelessWidget {
  11 + @override
  12 + Widget build(BuildContext context) {
  13 + return StoreProvider<AppState>(
  14 + store: store,
  15 + child: MaterialApp(
  16 + title: 'Redux Sample',
  17 + theme: ThemeData(
  18 + primarySwatch: Colors.blue,
  19 + ),
  20 + home: Page(title: 'Redux Sample'),
  21 + ),
  22 + );
  23 + }
  24 +}
  25 +
  26 +class Page extends StatefulWidget {
  27 + Page({
  28 + Key key,
  29 + this.title,
  30 + }) : super(key: key);
  31 +
  32 + final String title;
  33 +
  34 + @override
  35 + _PageState createState() => _PageState();
  36 +}
  37 +
  38 +class _PageState extends State<Page> {
  39 + @override
  40 + void initState() {
  41 + super.initState();
  42 + fill();
  43 + }
  44 +
  45 + fill() async {
  46 + for (int i = 0; i < 10; i++) {
  47 + await Future.delayed(Duration(milliseconds: 500));
  48 + store.dispatch(
  49 + AddItemAction(payload: Item(title: DateTime.now().toString())));
  50 + }
  51 + print("It's done. Print now!");
  52 + }
  53 +
  54 + @override
  55 + Widget build(BuildContext context) {
  56 + return Scaffold(
  57 + appBar: AppBar(
  58 + title: Text(widget.title),
  59 + ),
  60 + body: ListViewWidget(),
  61 + );
  62 + }
  63 +}
  64 +
  65 +class ListViewWidget extends StatelessWidget {
  66 + @override
  67 + Widget build(BuildContext context) {
  68 + return StoreConnector<AppState, List<Item>>(
  69 + converter: (store) => store.state.items,
  70 + builder: (context, items) {
  71 + return ListView.builder(
  72 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  73 + itemCount: items.length,
  74 + itemBuilder: (context, index) {
  75 + return ListTile(
  76 + title: Text(items[index].title),
  77 + );
  78 + },
  79 + );
  80 + },
  81 + );
  82 + }
  83 +}
  1 +class Item {
  2 + final String title;
  3 +
  4 + Item({
  5 + this.title,
  6 + });
  7 +}
  8 +
  9 +final List<Item> sampleItems = [
  10 + Item(title: 'Item 1'),
  11 + Item(title: 'Item 2'),
  12 + Item(title: 'Item 3')
  13 +];
  1 +import 'package:flutter/material.dart';
  2 +
  3 +import 'package:benckmark/_bloc_plain/app.dart';
  4 +//import 'package:benckmark/_bloc_lib/app.dart';
  5 +//import 'package:benckmark/_mobx/app.dart';
  6 +//import 'package:benckmark/_redux/app.dart';
  7 +//import 'package:benckmark/_get_rx/app.dart';
  8 +
  9 +//import 'package:benckmark/_provider/app.dart';
  10 +//import 'package:benckmark/_get/app.dart';
  11 +
  12 +void main() => runApp(App());
1 # Generated by pub 1 # Generated by pub
2 # See https://dart.dev/tools/pub/glossary#lockfile 2 # See https://dart.dev/tools/pub/glossary#lockfile
3 packages: 3 packages:
  4 + _fe_analyzer_shared:
  5 + dependency: transitive
  6 + description:
  7 + name: _fe_analyzer_shared
  8 + url: "https://pub.dartlang.org"
  9 + source: hosted
  10 + version: "4.0.0"
  11 + analyzer:
  12 + dependency: transitive
  13 + description:
  14 + name: analyzer
  15 + url: "https://pub.dartlang.org"
  16 + source: hosted
  17 + version: "0.39.10"
  18 + args:
  19 + dependency: transitive
  20 + description:
  21 + name: args
  22 + url: "https://pub.dartlang.org"
  23 + source: hosted
  24 + version: "1.6.0"
4 async: 25 async:
5 dependency: transitive 26 dependency: transitive
6 description: 27 description:
@@ -8,6 +29,13 @@ packages: @@ -8,6 +29,13 @@ packages:
8 url: "https://pub.dartlang.org" 29 url: "https://pub.dartlang.org"
9 source: hosted 30 source: hosted
10 version: "2.4.1" 31 version: "2.4.1"
  32 + bloc:
  33 + dependency: "direct main"
  34 + description:
  35 + name: bloc
  36 + url: "https://pub.dartlang.org"
  37 + source: hosted
  38 + version: "4.0.0"
11 boolean_selector: 39 boolean_selector:
12 dependency: transitive 40 dependency: transitive
13 description: 41 description:
@@ -15,6 +43,62 @@ packages: @@ -15,6 +43,62 @@ packages:
15 url: "https://pub.dartlang.org" 43 url: "https://pub.dartlang.org"
16 source: hosted 44 source: hosted
17 version: "2.0.0" 45 version: "2.0.0"
  46 + build:
  47 + dependency: transitive
  48 + description:
  49 + name: build
  50 + url: "https://pub.dartlang.org"
  51 + source: hosted
  52 + version: "1.3.0"
  53 + build_config:
  54 + dependency: transitive
  55 + description:
  56 + name: build_config
  57 + url: "https://pub.dartlang.org"
  58 + source: hosted
  59 + version: "0.4.2"
  60 + build_daemon:
  61 + dependency: transitive
  62 + description:
  63 + name: build_daemon
  64 + url: "https://pub.dartlang.org"
  65 + source: hosted
  66 + version: "2.1.4"
  67 + build_resolvers:
  68 + dependency: transitive
  69 + description:
  70 + name: build_resolvers
  71 + url: "https://pub.dartlang.org"
  72 + source: hosted
  73 + version: "1.3.9"
  74 + build_runner:
  75 + dependency: "direct dev"
  76 + description:
  77 + name: build_runner
  78 + url: "https://pub.dartlang.org"
  79 + source: hosted
  80 + version: "1.10.0"
  81 + build_runner_core:
  82 + dependency: transitive
  83 + description:
  84 + name: build_runner_core
  85 + url: "https://pub.dartlang.org"
  86 + source: hosted
  87 + version: "5.2.0"
  88 + built_collection:
  89 + dependency: transitive
  90 + description:
  91 + name: built_collection
  92 + url: "https://pub.dartlang.org"
  93 + source: hosted
  94 + version: "4.3.2"
  95 + built_value:
  96 + dependency: transitive
  97 + description:
  98 + name: built_value
  99 + url: "https://pub.dartlang.org"
  100 + source: hosted
  101 + version: "7.1.0"
18 charcode: 102 charcode:
19 dependency: transitive 103 dependency: transitive
20 description: 104 description:
@@ -22,6 +106,13 @@ packages: @@ -22,6 +106,13 @@ packages:
22 url: "https://pub.dartlang.org" 106 url: "https://pub.dartlang.org"
23 source: hosted 107 source: hosted
24 version: "1.1.3" 108 version: "1.1.3"
  109 + checked_yaml:
  110 + dependency: transitive
  111 + description:
  112 + name: checked_yaml
  113 + url: "https://pub.dartlang.org"
  114 + source: hosted
  115 + version: "1.0.2"
25 clock: 116 clock:
26 dependency: transitive 117 dependency: transitive
27 description: 118 description:
@@ -29,6 +120,13 @@ packages: @@ -29,6 +120,13 @@ packages:
29 url: "https://pub.dartlang.org" 120 url: "https://pub.dartlang.org"
30 source: hosted 121 source: hosted
31 version: "1.0.1" 122 version: "1.0.1"
  123 + code_builder:
  124 + dependency: transitive
  125 + description:
  126 + name: code_builder
  127 + url: "https://pub.dartlang.org"
  128 + source: hosted
  129 + version: "3.3.0"
32 collection: 130 collection:
33 dependency: transitive 131 dependency: transitive
34 description: 132 description:
@@ -36,6 +134,48 @@ packages: @@ -36,6 +134,48 @@ packages:
36 url: "https://pub.dartlang.org" 134 url: "https://pub.dartlang.org"
37 source: hosted 135 source: hosted
38 version: "1.14.12" 136 version: "1.14.12"
  137 + convert:
  138 + dependency: transitive
  139 + description:
  140 + name: convert
  141 + url: "https://pub.dartlang.org"
  142 + source: hosted
  143 + version: "2.1.1"
  144 + crypto:
  145 + dependency: transitive
  146 + description:
  147 + name: crypto
  148 + url: "https://pub.dartlang.org"
  149 + source: hosted
  150 + version: "2.1.5"
  151 + csslib:
  152 + dependency: transitive
  153 + description:
  154 + name: csslib
  155 + url: "https://pub.dartlang.org"
  156 + source: hosted
  157 + version: "0.16.1"
  158 + cupertino_icons:
  159 + dependency: "direct main"
  160 + description:
  161 + name: cupertino_icons
  162 + url: "https://pub.dartlang.org"
  163 + source: hosted
  164 + version: "0.1.3"
  165 + dart_style:
  166 + dependency: transitive
  167 + description:
  168 + name: dart_style
  169 + url: "https://pub.dartlang.org"
  170 + source: hosted
  171 + version: "1.3.6"
  172 + equatable:
  173 + dependency: "direct main"
  174 + description:
  175 + name: equatable
  176 + url: "https://pub.dartlang.org"
  177 + source: hosted
  178 + version: "1.2.0"
39 fake_async: 179 fake_async:
40 dependency: transitive 180 dependency: transitive
41 description: 181 description:
@@ -43,16 +183,114 @@ packages: @@ -43,16 +183,114 @@ packages:
43 url: "https://pub.dartlang.org" 183 url: "https://pub.dartlang.org"
44 source: hosted 184 source: hosted
45 version: "1.1.0" 185 version: "1.1.0"
  186 + fixnum:
  187 + dependency: transitive
  188 + description:
  189 + name: fixnum
  190 + url: "https://pub.dartlang.org"
  191 + source: hosted
  192 + version: "0.10.11"
46 flutter: 193 flutter:
47 dependency: "direct main" 194 dependency: "direct main"
48 description: flutter 195 description: flutter
49 source: sdk 196 source: sdk
50 version: "0.0.0" 197 version: "0.0.0"
  198 + flutter_bloc:
  199 + dependency: "direct main"
  200 + description:
  201 + name: flutter_bloc
  202 + url: "https://pub.dartlang.org"
  203 + source: hosted
  204 + version: "4.0.0"
  205 + flutter_mobx:
  206 + dependency: "direct main"
  207 + description:
  208 + name: flutter_mobx
  209 + url: "https://pub.dartlang.org"
  210 + source: hosted
  211 + version: "0.3.7"
  212 + flutter_redux:
  213 + dependency: "direct main"
  214 + description:
  215 + name: flutter_redux
  216 + url: "https://pub.dartlang.org"
  217 + source: hosted
  218 + version: "0.6.0"
51 flutter_test: 219 flutter_test:
52 dependency: "direct dev" 220 dependency: "direct dev"
53 description: flutter 221 description: flutter
54 source: sdk 222 source: sdk
55 version: "0.0.0" 223 version: "0.0.0"
  224 + get:
  225 + dependency: "direct main"
  226 + description:
  227 + name: get
  228 + url: "https://pub.dartlang.org"
  229 + source: hosted
  230 + version: "2.12.4"
  231 + glob:
  232 + dependency: transitive
  233 + description:
  234 + name: glob
  235 + url: "https://pub.dartlang.org"
  236 + source: hosted
  237 + version: "1.2.0"
  238 + graphs:
  239 + dependency: transitive
  240 + description:
  241 + name: graphs
  242 + url: "https://pub.dartlang.org"
  243 + source: hosted
  244 + version: "0.2.0"
  245 + html:
  246 + dependency: transitive
  247 + description:
  248 + name: html
  249 + url: "https://pub.dartlang.org"
  250 + source: hosted
  251 + version: "0.14.0+3"
  252 + http_multi_server:
  253 + dependency: transitive
  254 + description:
  255 + name: http_multi_server
  256 + url: "https://pub.dartlang.org"
  257 + source: hosted
  258 + version: "2.2.0"
  259 + http_parser:
  260 + dependency: transitive
  261 + description:
  262 + name: http_parser
  263 + url: "https://pub.dartlang.org"
  264 + source: hosted
  265 + version: "3.1.4"
  266 + io:
  267 + dependency: transitive
  268 + description:
  269 + name: io
  270 + url: "https://pub.dartlang.org"
  271 + source: hosted
  272 + version: "0.3.4"
  273 + js:
  274 + dependency: transitive
  275 + description:
  276 + name: js
  277 + url: "https://pub.dartlang.org"
  278 + source: hosted
  279 + version: "0.6.2"
  280 + json_annotation:
  281 + dependency: transitive
  282 + description:
  283 + name: json_annotation
  284 + url: "https://pub.dartlang.org"
  285 + source: hosted
  286 + version: "3.0.1"
  287 + logging:
  288 + dependency: transitive
  289 + description:
  290 + name: logging
  291 + url: "https://pub.dartlang.org"
  292 + source: hosted
  293 + version: "0.11.4"
56 matcher: 294 matcher:
57 dependency: transitive 295 dependency: transitive
58 description: 296 description:
@@ -61,12 +299,61 @@ packages: @@ -61,12 +299,61 @@ packages:
61 source: hosted 299 source: hosted
62 version: "0.12.6" 300 version: "0.12.6"
63 meta: 301 meta:
64 - dependency: transitive 302 + dependency: "direct main"
65 description: 303 description:
66 name: meta 304 name: meta
67 url: "https://pub.dartlang.org" 305 url: "https://pub.dartlang.org"
68 source: hosted 306 source: hosted
69 version: "1.1.8" 307 version: "1.1.8"
  308 + mime:
  309 + dependency: transitive
  310 + description:
  311 + name: mime
  312 + url: "https://pub.dartlang.org"
  313 + source: hosted
  314 + version: "0.9.6+3"
  315 + mobx:
  316 + dependency: "direct main"
  317 + description:
  318 + name: mobx
  319 + url: "https://pub.dartlang.org"
  320 + source: hosted
  321 + version: "0.4.0+4"
  322 + mobx_codegen:
  323 + dependency: "direct dev"
  324 + description:
  325 + name: mobx_codegen
  326 + url: "https://pub.dartlang.org"
  327 + source: hosted
  328 + version: "0.4.2"
  329 + nested:
  330 + dependency: transitive
  331 + description:
  332 + name: nested
  333 + url: "https://pub.dartlang.org"
  334 + source: hosted
  335 + version: "0.0.4"
  336 + node_interop:
  337 + dependency: transitive
  338 + description:
  339 + name: node_interop
  340 + url: "https://pub.dartlang.org"
  341 + source: hosted
  342 + version: "1.1.1"
  343 + node_io:
  344 + dependency: transitive
  345 + description:
  346 + name: node_io
  347 + url: "https://pub.dartlang.org"
  348 + source: hosted
  349 + version: "1.1.1"
  350 + package_config:
  351 + dependency: transitive
  352 + description:
  353 + name: package_config
  354 + url: "https://pub.dartlang.org"
  355 + source: hosted
  356 + version: "1.9.3"
70 path: 357 path:
71 dependency: transitive 358 dependency: transitive
72 description: 359 description:
@@ -74,11 +361,95 @@ packages: @@ -74,11 +361,95 @@ packages:
74 url: "https://pub.dartlang.org" 361 url: "https://pub.dartlang.org"
75 source: hosted 362 source: hosted
76 version: "1.7.0" 363 version: "1.7.0"
  364 + pedantic:
  365 + dependency: transitive
  366 + description:
  367 + name: pedantic
  368 + url: "https://pub.dartlang.org"
  369 + source: hosted
  370 + version: "1.9.0"
  371 + pool:
  372 + dependency: transitive
  373 + description:
  374 + name: pool
  375 + url: "https://pub.dartlang.org"
  376 + source: hosted
  377 + version: "1.4.0"
  378 + provider:
  379 + dependency: "direct main"
  380 + description:
  381 + name: provider
  382 + url: "https://pub.dartlang.org"
  383 + source: hosted
  384 + version: "4.1.3"
  385 + pub_semver:
  386 + dependency: transitive
  387 + description:
  388 + name: pub_semver
  389 + url: "https://pub.dartlang.org"
  390 + source: hosted
  391 + version: "1.4.4"
  392 + pubspec_parse:
  393 + dependency: transitive
  394 + description:
  395 + name: pubspec_parse
  396 + url: "https://pub.dartlang.org"
  397 + source: hosted
  398 + version: "0.1.5"
  399 + quiver:
  400 + dependency: transitive
  401 + description:
  402 + name: quiver
  403 + url: "https://pub.dartlang.org"
  404 + source: hosted
  405 + version: "2.1.3"
  406 + redux:
  407 + dependency: "direct main"
  408 + description:
  409 + name: redux
  410 + url: "https://pub.dartlang.org"
  411 + source: hosted
  412 + version: "4.0.0"
  413 + rxdart:
  414 + dependency: "direct main"
  415 + description:
  416 + name: rxdart
  417 + url: "https://pub.dartlang.org"
  418 + source: hosted
  419 + version: "0.23.1"
  420 + scoped_model:
  421 + dependency: "direct main"
  422 + description:
  423 + name: scoped_model
  424 + url: "https://pub.dartlang.org"
  425 + source: hosted
  426 + version: "1.0.1"
  427 + shelf:
  428 + dependency: transitive
  429 + description:
  430 + name: shelf
  431 + url: "https://pub.dartlang.org"
  432 + source: hosted
  433 + version: "0.7.5"
  434 + shelf_web_socket:
  435 + dependency: transitive
  436 + description:
  437 + name: shelf_web_socket
  438 + url: "https://pub.dartlang.org"
  439 + source: hosted
  440 + version: "0.2.3"
77 sky_engine: 441 sky_engine:
78 dependency: transitive 442 dependency: transitive
79 description: flutter 443 description: flutter
80 source: sdk 444 source: sdk
81 version: "0.0.99" 445 version: "0.0.99"
  446 + source_gen:
  447 + dependency: transitive
  448 + description:
  449 + name: source_gen
  450 + url: "https://pub.dartlang.org"
  451 + source: hosted
  452 + version: "0.9.5"
82 source_span: 453 source_span:
83 dependency: transitive 454 dependency: transitive
84 description: 455 description:
@@ -100,6 +471,13 @@ packages: @@ -100,6 +471,13 @@ packages:
100 url: "https://pub.dartlang.org" 471 url: "https://pub.dartlang.org"
101 source: hosted 472 source: hosted
102 version: "2.0.0" 473 version: "2.0.0"
  474 + stream_transform:
  475 + dependency: transitive
  476 + description:
  477 + name: stream_transform
  478 + url: "https://pub.dartlang.org"
  479 + source: hosted
  480 + version: "1.2.0"
103 string_scanner: 481 string_scanner:
104 dependency: transitive 482 dependency: transitive
105 description: 483 description:
@@ -121,6 +499,13 @@ packages: @@ -121,6 +499,13 @@ packages:
121 url: "https://pub.dartlang.org" 499 url: "https://pub.dartlang.org"
122 source: hosted 500 source: hosted
123 version: "0.2.16" 501 version: "0.2.16"
  502 + timing:
  503 + dependency: transitive
  504 + description:
  505 + name: timing
  506 + url: "https://pub.dartlang.org"
  507 + source: hosted
  508 + version: "0.1.1+2"
124 typed_data: 509 typed_data:
125 dependency: transitive 510 dependency: transitive
126 description: 511 description:
@@ -128,6 +513,13 @@ packages: @@ -128,6 +513,13 @@ packages:
128 url: "https://pub.dartlang.org" 513 url: "https://pub.dartlang.org"
129 source: hosted 514 source: hosted
130 version: "1.1.6" 515 version: "1.1.6"
  516 + uuid:
  517 + dependency: "direct main"
  518 + description:
  519 + name: uuid
  520 + url: "https://pub.dartlang.org"
  521 + source: hosted
  522 + version: "2.0.4"
131 vector_math: 523 vector_math:
132 dependency: transitive 524 dependency: transitive
133 description: 525 description:
@@ -135,5 +527,27 @@ packages: @@ -135,5 +527,27 @@ packages:
135 url: "https://pub.dartlang.org" 527 url: "https://pub.dartlang.org"
136 source: hosted 528 source: hosted
137 version: "2.0.8" 529 version: "2.0.8"
  530 + watcher:
  531 + dependency: transitive
  532 + description:
  533 + name: watcher
  534 + url: "https://pub.dartlang.org"
  535 + source: hosted
  536 + version: "0.9.7+15"
  537 + web_socket_channel:
  538 + dependency: transitive
  539 + description:
  540 + name: web_socket_channel
  541 + url: "https://pub.dartlang.org"
  542 + source: hosted
  543 + version: "1.1.0"
  544 + yaml:
  545 + dependency: transitive
  546 + description:
  547 + name: yaml
  548 + url: "https://pub.dartlang.org"
  549 + source: hosted
  550 + version: "2.2.1"
138 sdks: 551 sdks:
139 dart: ">=2.7.0 <3.0.0" 552 dart: ">=2.7.0 <3.0.0"
  553 + flutter: ">=1.16.0"
1 -name: get  
2 -description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.  
3 -version: 2.12.4  
4 -homepage: https://github.com/jonataslaw/get  
5 -  
6 -environment:  
7 - sdk: ">=2.6.0 <3.0.0" 1 +name: benckmark
  2 +description: A new Flutter application showing different kinds of state management.
8 3
9 dependencies: 4 dependencies:
10 flutter: 5 flutter:
11 sdk: flutter 6 sdk: flutter
  7 + cupertino_icons: ^0.1.2
  8 + get: ^2.12.4
  9 + bloc: ^4.0.0
  10 + equatable: ^1.0.2
  11 + flutter_bloc: ^4.0.0
  12 + flutter_mobx: ^0.3.6
  13 + flutter_redux: ^0.6.0
  14 + meta:
  15 + mobx: ^0.4.0+1
  16 + provider: ^4.0.1
  17 + redux: ^4.0.0
  18 + rxdart: ^0.23.1
  19 + uuid: ^2.0.4
12 20
13 dev_dependencies: 21 dev_dependencies:
14 flutter_test: 22 flutter_test:
15 sdk: flutter 23 sdk: flutter
16 24
  25 + build_runner: ^1.7.3
  26 + mobx_codegen: ^0.4.0+1
  27 +
  28 +
17 # For information on the generic Dart part of this file, see the 29 # For information on the generic Dart part of this file, see the
18 -# following page: https://dart.dev/tools/pub/pubspec 30 +# following page: https://www.dartlang.org/tools/pub/pubspec
19 31
20 # The following section is specific to Flutter. 32 # The following section is specific to Flutter.
21 flutter: 33 flutter:
22 34
23 - # To add assets to your package, add an assets section, like this: 35 + # The following line ensures that the Material Icons font is
  36 + # included with your application, so that you can use the icons in
  37 + # the material Icons class.
  38 + uses-material-design: true
  39 +
  40 + # To add assets to your application, add an assets section, like this:
24 # assets: 41 # assets:
25 # - images/a_dot_burr.jpeg 42 # - images/a_dot_burr.jpeg
26 # - images/a_dot_ham.jpeg 43 # - images/a_dot_ham.jpeg
27 - #  
28 - # For details regarding assets in packages, see  
29 - # https://flutter.dev/assets-and-images/#from-packages  
30 - # 44 +
31 # An image asset can refer to one or more resolution-specific "variants", see 45 # An image asset can refer to one or more resolution-specific "variants", see
32 - # https://flutter.dev/assets-and-images/#resolution-aware. 46 + # https://flutter.io/assets-and-images/#resolution-aware.
  47 +
  48 + # For details regarding adding assets from package dependencies, see
  49 + # https://flutter.io/assets-and-images/#from-packages
33 50
34 - # To add custom fonts to your package, add a fonts section here, 51 + # To add custom fonts to your application, add a fonts section here,
35 # in this "flutter" section. Each entry in this list should have a 52 # in this "flutter" section. Each entry in this list should have a
36 # "family" key with the font family name, and a "fonts" key with a 53 # "family" key with the font family name, and a "fonts" key with a
37 # list giving the asset and other descriptors for the font. For 54 # list giving the asset and other descriptors for the font. For
@@ -48,5 +65,5 @@ flutter: @@ -48,5 +65,5 @@ flutter:
48 # - asset: fonts/TrajanPro_Bold.ttf 65 # - asset: fonts/TrajanPro_Bold.ttf
49 # weight: 700 66 # weight: 700
50 # 67 #
51 - # For details regarding fonts in packages, see  
52 - # https://flutter.dev/custom-fonts/#from-packages 68 + # For details regarding fonts from package dependencies,
  69 + # see https://flutter.io/custom-fonts/#from-packages
  1 +// This is a basic Flutter widget test.
  2 +// To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
  3 +// provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
  4 +// find child widgets in the widget tree, read text, and verify that the values of widget properties
  5 +// are correct.
  6 +
  7 +import 'package:flutter/material.dart';
  8 +import 'package:benckmark/_redux/app.dart';
  9 +import 'package:flutter_test/flutter_test.dart';
  10 +
  11 +void main() {
  12 + testWidgets('Counter increments smoke test', (WidgetTester tester) async {
  13 + // Build our app and trigger a frame.
  14 + await tester.pumpWidget(App());
  15 +
  16 + // Verify that our counter starts at 0.
  17 + expect(find.text('0'), findsOneWidget);
  18 + expect(find.text('1'), findsNothing);
  19 +
  20 + // Tap the '+' icon and trigger a frame.
  21 + await tester.tap(find.byIcon(Icons.add));
  22 + await tester.pump();
  23 +
  24 + // Verify that our counter has incremented.
  25 + expect(find.text('0'), findsNothing);
  26 + expect(find.text('1'), findsOneWidget);
  27 + });
  28 +}