Nipodemos

small changes on main README

Showing 1 changed file with 72 additions and 34 deletions
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 [![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-) 14 [![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
15 <!-- ALL-CONTRIBUTORS-BADGE:END --> 15 <!-- ALL-CONTRIBUTORS-BADGE:END -->
16 - [About Get](#about-get) 16 - [About Get](#about-get)
  17 +- [Installing](#installing)
17 - [The Three pillars](#the-three-pillars) 18 - [The Three pillars](#the-three-pillars)
18 - [State management](#state-management) 19 - [State management](#state-management)
19 - [In-depth explanation](#in-depth-explanation) 20 - [In-depth explanation](#in-depth-explanation)
@@ -33,10 +34,27 @@ @@ -33,10 +34,27 @@
33 34
34 - GetX 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. 35 - GetX 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.
35 - GetX is not for everyone, its focus is (performance) on the minimum consumption of resources ([look the benchmarks](https://github.com/jonataslaw/benchmarks)), (productivity) using an easy and pleasant syntax and (organization) allowing the total decoupling of the View from the business logic. 36 - GetX is not for everyone, its focus is (performance) on the minimum consumption of resources ([look the benchmarks](https://github.com/jonataslaw/benchmarks)), (productivity) using an easy and pleasant syntax and (organization) allowing the total decoupling of the View from the business logic.
36 -- GetX 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. 37 +- GetX will save hours of development, and will extract the maximum performance that your application can deliver, being easy for beginners, and accurate for experts.
  38 +- Navigate without `context`, open `dialogs`, `snackbars` or `bottomsheets` from anywhere in your code, Manage states and inject dependencies in an easy and practical way.
  39 +- Get is secure, stable, up-to-date, and offers a huge range of APIs that are not present on default framework.
37 - GetX is not a bloc. It has a multitude of features that allow you to start programming without worrying about anything, but each of these features are in separate containers, and are only started after use. If you only use State Management, only State Management will be compiled. If you only use routes, nothing from the state management will be compiled. You can compile the benchmark repository, and you will see that using only Get state management, the application compiled with Get has become smaller than all other applications that have only the state management of other packages, because nothing that is not used will be compiled into your code, and each GetX solution was designed to be extra lightweight. The merit here also comes from Flutter's AOT which is incredible, and manages to eliminate unused resources like no other framework does. 40 - GetX is not a bloc. It has a multitude of features that allow you to start programming without worrying about anything, but each of these features are in separate containers, and are only started after use. If you only use State Management, only State Management will be compiled. If you only use routes, nothing from the state management will be compiled. You can compile the benchmark repository, and you will see that using only Get state management, the application compiled with Get has become smaller than all other applications that have only the state management of other packages, because nothing that is not used will be compiled into your code, and each GetX solution was designed to be extra lightweight. The merit here also comes from Flutter's AOT which is incredible, and manages to eliminate unused resources like no other framework does.
38 41
39 -**GetX makes your development productive, but want to make it even more productive? Add the extension [GetX extension to VSCode](https://marketplace.visualstudio.com/items?itemName=get-snippets.get-snippets) to your VSCode** 42 +**GetX makes your development productive, but want to make it even more productive? Add the extension [GetX extension](https://marketplace.visualstudio.com/items?itemName=get-snippets.get-snippets) to your VSCode**. Not available in other IDEs for now.
  43 +
  44 +# Installing
  45 +
  46 +Add Get to your pubspec.yaml file:
  47 +
  48 +```yaml
  49 +dependencies:
  50 + get:
  51 +```
  52 +
  53 +Import get in files that it will be used:
  54 +
  55 +```dart
  56 +import 'package:get/get.dart';
  57 +```
40 58
41 # The Three pillars 59 # The Three pillars
42 60
@@ -103,7 +121,7 @@ This is a simple project but it already makes clear how powerful Get is. As your @@ -103,7 +121,7 @@ This is a simple project but it already makes clear how powerful Get is. As your
103 121
104 ### In-depth explanation 122 ### In-depth explanation
105 123
106 -**See an more in-depth explanation of state management [here](./docs/en_US/state_management.md). There you will see more examples and also the differente between the simple stage manager and the reactive state manager** 124 +**See an more in-depth explanation of state management [here](./docs/en_US/state_management.md). There you will see more examples and also the difference between the simple stage manager and the reactive state manager**
107 125
108 ## Route management 126 ## Route management
109 127
@@ -237,43 +255,63 @@ If you want to know in depth how to change the theme, you can follow this tutori @@ -237,43 +255,63 @@ If you want to know in depth how to change the theme, you can follow this tutori
237 ## Other Advanced APIs 255 ## Other Advanced APIs
238 256
239 ```dart 257 ```dart
240 -Get.arguments // give the current args from currentScreen 258 +// give the current args from currentScreen
  259 +Get.arguments
241 260
242 -Get.previousArguments // give arguments of previous route 261 +// give arguments of previous route
  262 +Get.previousArguments
243 263
244 -Get.previousRoute // give name of previous route 264 +// give name of previous route
  265 +Get.previousRoute
245 266
246 -Get.rawRoute // give the raw route to access for example, rawRoute.isFirst() 267 +// give the raw route to access for example, rawRoute.isFirst()
  268 +Get.rawRoute
247 269
248 -Get.routing // give access to Rounting API from GetObserver 270 +// give access to Rounting API from GetObserver
  271 +Get.routing
249 272
250 -Get.isSnackbarOpen // check if snackbar is open 273 +// check if snackbar is open
  274 +Get.isSnackbarOpen
251 275
252 -Get.isDialogOpen // check if dialog is open 276 +// check if dialog is open
  277 +Get.isDialogOpen
253 278
254 -Get.isBottomSheetOpen // check if bottomsheet is open 279 +// check if bottomsheet is open
  280 +Get.isBottomSheetOpen
255 281
256 -Get.removeRoute() // remove one route. 282 +// remove one route.
  283 +Get.removeRoute()
257 284
258 -Get.until() // back repeatedly until the predicate returns true. 285 +// back repeatedly until the predicate returns true.
  286 +Get.until()
259 287
260 -Get.offUntil() // go to next route and remove all the previous routes until the predicate returns true. 288 +// go to next route and remove all the previous routes until the predicate returns true.
  289 +Get.offUntil()
261 290
262 -Get.offNamedUntil() // go to next named route and remove all the previous routes until the predicate returns true. 291 +// go to next named route and remove all the previous routes until the predicate returns true.
  292 +Get.offNamedUntil()
263 293
264 -GetPlatform.isAndroid/isIOS/isWeb... //(This method is completely compatible with FlutterWeb, unlike the framework. "Platform.isAndroid") 294 +//Check in what platform the app is running
  295 +GetPlatform.isAndroid
  296 +GetPlatform.isIOS
  297 +GetPlatform.isWeb
265 298
266 -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 299 +// Equivalent to the method: MediaQuery.of(context).size.height, but they are immutable.
  300 +// If you need a changeable height/width (like browser windows that can be scaled) you will need to use context.
  301 +Get.height
  302 +Get.width
267 303
268 -Get.context // Gives the context of the screen in the foreground anywhere in your code. 304 +// Gives the context of the screen in the foreground anywhere in your code.
  305 +Get.context
269 306
270 -Get.contextOverlay // Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code. 307 +// Gives the context of the snackbar/dialog/bottomsheet in the foreground anywhere in your code.
  308 +Get.contextOverlay
271 309
272 ``` 310 ```
273 311
274 ### Optional Global Settings and Manual configurations 312 ### Optional Global Settings and Manual configurations
275 313
276 -GetMaterialApp configures everything for you, but if you want to configure Get Manually using advanced APIs. 314 +GetMaterialApp configures everything for you, but if you want to configure Get manually.
277 315
278 ```dart 316 ```dart
279 MaterialApp( 317 MaterialApp(
@@ -287,7 +325,9 @@ You will also be able to use your own Middleware within GetObserver, this will n @@ -287,7 +325,9 @@ You will also be able to use your own Middleware within GetObserver, this will n
287 ```dart 325 ```dart
288 MaterialApp( 326 MaterialApp(
289 navigatorKey: Get.key, 327 navigatorKey: Get.key,
290 - navigatorObservers: [GetObserver(MiddleWare.observer)], // Here 328 + navigatorObservers: [
  329 + GetObserver(MiddleWare.observer) // Here
  330 + ],
291 ); 331 );
292 ``` 332 ```
293 333
@@ -313,17 +353,15 @@ Get.config( @@ -313,17 +353,15 @@ Get.config(
313 # Breaking changes from 2.0 353 # Breaking changes from 2.0
314 354
315 1- Rx types: 355 1- Rx types:
316 -Before: StringX now: RxString  
317 356
318 -Before: IntX now: RxInt  
319 -  
320 -Before: MapX now: RxMax  
321 -  
322 -Before: ListX now: RxList  
323 -  
324 -Before: NumX now: RxNum  
325 -  
326 -Before: RxDouble now: RxDouble 357 +| Before | After |
  358 +| -------- | ---------- |
  359 +| StringX | `RxString` |
  360 +| IntX | `RxInt` |
  361 +| MapX | `RxMax` |
  362 +| ListX | `RxList` |
  363 +| NumX | `RxNum` |
  364 +| RxDouble | `RxDouble` |
327 365
328 RxController and GetBuilder now have merged, you no longer need to memorize which controller you want to use, just use GetxController, it will work for simple state management and for reactive as well. 366 RxController and GetBuilder now have merged, you no longer need to memorize which controller you want to use, just use GetxController, it will work for simple state management and for reactive as well.
329 367
@@ -365,8 +403,6 @@ GetMaterialApp( @@ -365,8 +403,6 @@ GetMaterialApp(
365 ) 403 )
366 ``` 404 ```
367 405
368 -This library will always be updated and implementing new features. Feel free to offer PRs and contribute to them.  
369 -  
370 # Why I made this package 406 # Why I made this package
371 407
372 The problem that this package tries to solve is to have most of what you need in only one package. One day, when i update some of my apps to work with Flutter 1.9, something bad happened: Everything broke. 408 The problem that this package tries to solve is to have most of what you need in only one package. One day, when i update some of my apps to work with Flutter 1.9, something bad happened: Everything broke.
@@ -381,4 +417,6 @@ I know this looks a lot like the package being based on my personal experiences, @@ -381,4 +417,6 @@ I know this looks a lot like the package being based on my personal experiences,
381 417
382 Every time I go through a frustrating experience, I write it down in my schedule, and try to resolve it after completing the project. 418 Every time I go through a frustrating experience, I write it down in my schedule, and try to resolve it after completing the project.
383 419
384 -And then I decided to make a package that have the three things that you will always use: State management, route management, Dependency injection/management, internationalization, and storage (the last two are still being made) 420 +And then I decided to make a package that have the three things that you will always use: State management, route management, Dependency injection/management. Eventually i made internationalization, and storage (the last two are still being made)
  421 +
  422 +This library will always be updated and implementing new features. Feel free to offer PRs and contribute to them.