When `.darkmode` is activated, it will switch to the _light theme_, and when the _light theme_ becomes active, it will change to _dark theme_.
## GetConnect
## গেট কানেক্ট (GetConnect)
GetConnect is an easy way to communicate from your back to your front with http or websockets
...
...
@@ -497,13 +497,13 @@ class HomeProvider extends GetConnect {
}
```
## GetPage মিডিলওয়্যার
## গেট পেজ মিডিলওয়্যার
The GetPage has now new property that takes a list of GetMiddleWare and run them in the specific order.
**Note**: When GetPage has a Middlewares, all the children of this page will have the same middlewares automatically.
### Priority
### অগ্রাধিকার (Priority)
The Order of the Middlewares to run can be set by the priority in the GetMiddleware.
...
...
@@ -518,7 +518,7 @@ final middlewares = [
those middlewares will be run in this order **-8 => 2 => 4 => 5**
### Redirect
### পুনঃনির্দেশ (Redirect)
This function will be called when the page of the called route is being searched for. It takes RouteSettings as a result to redirect to. Or give it null and there will be no redirecting.
This function will be called right after the GetPage.page function is called and will give you the result of the function. and take the widget that will be showed.
### OnPageDispose
### অন-পেজ ডিসপোজ (OnPageDispose)
This function will be called right after disposing all the related objects (Controllers, views, ...) of the page.
## Other Advanced APIs
## অন্যান্য এপিআই সমূহ
```dart
// give the current args from currentScreen
...
...
@@ -708,7 +708,7 @@ context.isTablet()
context.responsiveValue<T>()
```
### Optional Global Settings and Manual configurations
### ঐচ্ছিক গ্লোবাল সেটিংস এবং ম্যানুয়াল কনফিগারেশন
GetMaterialApp configures everything for you, but if you want to configure Get manually.
Most people have no idea about this Widget, or totally confuse the usage of it.
The use case is very rare, but very specific: It `caches` a Controller.
...
...
@@ -1024,7 +1024,7 @@ If you use, another "not so common" feature of **GetX**: `Get.create()`.
That's where `GetWidget` shines... as you can use it, for example,
to keep a list of Todo items. So, if the widget gets "rebuilt", it will keep the same controller instance.
#### GetxService
#### গেট এক্স সার্ভিস (GetxService)
This class is like a `GetxController`, it shares the same lifecycle ( `onInit()`, `onReady()`, `onClose()`).
But has no "logic" inside of it. It just notifies **GetX** Dependency Injection system, that this subclass
...
...
@@ -1076,7 +1076,7 @@ The only way to actually delete a `GetxService`, is with `Get.reset()` which is
lifetime of your app, use `GetxService`.
### Tests
### পরীক্ষা (Tests)
You can test your controllers like any other class, including their lifecycles:
...
...
@@ -1127,7 +1127,7 @@ Test the state of the reactive variable "name" across all of its lifecycles''',
}
```
#### Tips
#### পরামর্শ
##### Mockito or mocktail
If you need to mock your GetxController/GetxService, you should extend GetxController, and mixin it with Mock, that way
...
...
@@ -1143,7 +1143,7 @@ If you are testing widgets, or test groups, use Get.reset at the end of your tes
if you are using your navigation in your controllers, use `Get.testMode = true` at the beginning of your main.
# Breaking changes from 2.0
# 2.0 থেকে পরিবর্তন
1- Rx types:
...
...
@@ -1196,7 +1196,7 @@ GetMaterialApp(
)
```
# Why Getx?
# কেন Getx ব্যবহার করবেন?
1- Many times after a Flutter update, many of your packages will break. Sometimes compilation errors happen, errors often appear that there are still no answers about, and the developer needs to know where the error came from, track the error, only then try to open an issue in the corresponding repository, and see its problem solved. Get centralizes the main resources for development (State, dependency and route management), allowing you to add a single package to your pubspec, and start working. After a Flutter update, the only thing you need to do is update the Get dependency, and get to work. Get also resolves compatibility issues. How many times a version of a package is not compatible with the version of another, because one uses a dependency in one version, and the other in another version? This is also not a concern using Get, as everything is in the same package and is fully compatible.