jonataslaw

update to 3.3.0

## [3.3.0]
- Fix extensions (@stefandevo)
- Added CPF to utils options (@kauemurakami)
- Added fenix mode to Get.lazyPut.
Use `Get.lazyPut<Controller>(()=> Controller(), fenix:true)` to have a controller that after being destroyed, has the ability to be recreated in case someone needs it. This is a function that already exists in smartManagement.keepFactory which is now also possible in full mode.
- Fix native transition on android
## [3.2.2]
- Improve transitions and refactor route system
... ...
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/opt/flutter
FLUTTER_APPLICATION_PATH=/home/jonny/Área de trabalho/getx/benchmark/state_managers
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios
OTHER_LDFLAGS=$(inherited) -framework Flutter
FLUTTER_FRAMEWORK_DIR=/opt/flutter/bin/cache/artifacts/engine/ios
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=false
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.packages
... ...
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/opt/flutter"
export "FLUTTER_APPLICATION_PATH=/home/jonny/Área de trabalho/getx/benchmark/state_managers"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=/opt/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
... ...
... ... @@ -28,7 +28,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
bloc:
dependency: "direct main"
description:
... ... @@ -99,6 +99,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
charcode:
dependency: transitive
description:
... ... @@ -133,7 +140,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
version: "1.14.13"
convert:
dependency: transitive
description:
... ... @@ -297,7 +304,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: "direct main"
description:
... ... @@ -456,7 +463,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
... ... @@ -491,7 +498,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.16"
version: "0.2.17"
timing:
dependency: transitive
description:
... ... @@ -505,7 +512,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
uuid:
dependency: "direct main"
description:
... ...
... ... @@ -2,20 +2,8 @@
"configVersion": 2,
"packages": [
{
"name": "archive",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/archive-2.0.13",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "args",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.6.0",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "async",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.1",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.2",
"packageUri": "lib/",
"languageVersion": "2.2"
},
... ... @@ -26,40 +14,46 @@
"languageVersion": "2.4"
},
{
"name": "characters",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "charcode",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "collection",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12",
"name": "clock",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.0.1",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "convert",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1",
"name": "collection",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.13",
"packageUri": "lib/",
"languageVersion": "1.17"
"languageVersion": "2.3"
},
{
"name": "crypto",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.4",
"name": "dio",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/dio-3.0.9",
"packageUri": "lib/",
"languageVersion": "2.1"
"languageVersion": "2.4"
},
{
"name": "cupertino_icons",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3",
"name": "fake_async",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.1.0",
"packageUri": "lib/",
"languageVersion": "2.0"
"languageVersion": "2.2"
},
{
"name": "flutter",
"rootUri": "file:///opt/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.2"
"languageVersion": "2.9"
},
{
"name": "flutter_test",
... ... @@ -69,21 +63,21 @@
},
{
"name": "get",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.15.2",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.2.2",
"packageUri": "lib/",
"languageVersion": "2.1"
"languageVersion": "2.6"
},
{
"name": "image",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.12",
"name": "http_parser",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.4",
"packageUri": "lib/",
"languageVersion": "2.0"
"languageVersion": "2.3"
},
{
"name": "matcher",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.6",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.8",
"packageUri": "lib/",
"languageVersion": "2.2"
"languageVersion": "2.4"
},
{
"name": "meta",
... ... @@ -93,19 +87,7 @@
},
{
"name": "path",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "petitparser",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "quiver",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.1.3",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.7.0",
"packageUri": "lib/",
"languageVersion": "2.0"
},
... ... @@ -123,9 +105,9 @@
},
{
"name": "stack_trace",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.5",
"packageUri": "lib/",
"languageVersion": "1.23"
"languageVersion": "2.0"
},
{
"name": "stream_channel",
... ... @@ -147,15 +129,15 @@
},
{
"name": "test_api",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.15",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.17",
"packageUri": "lib/",
"languageVersion": "2.4"
"languageVersion": "2.7"
},
{
"name": "typed_data",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.0"
"languageVersion": "2.4"
},
{
"name": "vector_math",
... ... @@ -164,19 +146,13 @@
"languageVersion": "2.0"
},
{
"name": "xml",
"rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/xml-3.6.1",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "profileweb",
"name": "get_state",
"rootUri": "../",
"packageUri": "lib/",
"languageVersion": "2.1"
"languageVersion": "2.7"
}
],
"generated": "2020-04-27T06:02:27.159254Z",
"generated": "2020-07-14T09:09:42.984811Z",
"generator": "pub",
"generatorVersion": "2.8.0-dev.20.10"
"generatorVersion": "2.9.0-21.2.beta"
}
... ...
# Generated by pub on 2020-04-27 03:02:27.132181.
archive:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/archive-2.0.13/lib/
args:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.6.0/lib/
async:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.1/lib/
# Generated by pub on 2020-07-14 06:09:42.955823.
async:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.2/lib/
boolean_selector:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.0.0/lib/
characters:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.0.0/lib/
charcode:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3/lib/
collection:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.12/lib/
convert:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1/lib/
crypto:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.4/lib/
cupertino_icons:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/
clock:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.0.1/lib/
collection:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.13/lib/
dio:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/dio-3.0.9/lib/
fake_async:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.1.0/lib/
flutter:file:///opt/flutter/packages/flutter/lib/
flutter_test:file:///opt/flutter/packages/flutter_test/lib/
get:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/get-1.15.2/lib/
image:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.12/lib/
matcher:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.6/lib/
get:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.2.2/lib/
http_parser:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.4/lib/
matcher:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.8/lib/
meta:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8/lib/
path:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
petitparser:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0/lib/
quiver:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.1.3/lib/
path:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.7.0/lib/
sky_engine:file:///opt/flutter/bin/cache/pkg/sky_engine/lib/
source_span:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0/lib/
stack_trace:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
stack_trace:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.5/lib/
stream_channel:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/
string_scanner:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
term_glyph:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
test_api:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.15/lib/
typed_data:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
test_api:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.17/lib/
typed_data:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.2.0/lib/
vector_math:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
xml:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/xml-3.6.1/lib/
profileweb:lib/
get_state:lib/
... ...
import 'package:get/get.dart';
import 'package:get_state/home/controllers/home_controller.dart';
import 'package:get_state/home/data/home_provider.dart';
import 'package:get_state/home/data/home_repository.dart';
class HomeBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HomeController>(() {
final homeProvider = HomeProvider();
final homeRepository = HomeRepository(homeProvider);
return HomeController(homeRepository);
});
}
}
... ...
import 'package:get/get.dart';
import 'package:get_state/home/models/home_model.dart';
import 'package:get_state/home/repositorys/home_repository.dart';
import 'package:get_state/home/data/home_model.dart';
import 'package:get_state/home/data/home_repository.dart';
class Controller extends GetController {
/// You do not need that. I recommend using it just for ease of syntax.
/// with static method: Controller.to.fetchDataFromApi();
/// with no static method: Get.find<Controller>().fetchDataFromApi();
/// There is no difference in performance, nor any side effect of using either syntax. Only one does not need the type, and the other does.
static Controller get to => Get.find();
class HomeController extends GetxController {
HomeController(this.homeRepository);
final HomeRepository homeRepository;
ApiModel data;
Rx<ApiModel> data = Rx<ApiModel>();
@override
void onInit() => fetchDataFromApi();
void fetchDataFromApi() async {
Api api = Api();
final response = await api.fetchData();
if (response == null) {
Get.snackbar("Erro", "Não foi possível conectar ao servidor");
} else {
data = response;
update(this);
data.value = await homeRepository.getData();
if (data.value == null) {
Get.snackbar("Error", "Can't connect to server");
}
}
}
/// The first way works perfectly, but if you want to follow good practices,
/// you can make the data private and access it through a Get.
///
///
// class Controllers extends GetController {
// /// You do not need that. I recommend using it just for ease of syntax.
// /// with static method: Controller.to.fetchDataFromApi();
// /// with no static method: Get.find<Controller>().fetchDataFromApi();
// /// There is no difference in performance, nor any side effect of using either syntax. Only one does not need the type, and the other does.
// static Controller get to => Get.find();
// ApiModel _data;
// ApiModel get data => _data;
// void fetchDataFromApi() async {
// Api api = Api();
// final response = await api.fetchData();
// if (response == null) {
// Get.snackbar("Erro", "Não foi possível conectar ao servidor");
// } else {
// _data = response;
// update(this);
// }
// }
// }
... ...
import 'package:dio/dio.dart';
import 'package:get_state/home/models/home_model.dart';
import 'package:get_state/home/data/home_model.dart';
class Api {
/// To make your repository Global, you can use this:
///
/// static Api get to => Get.put(Api());
///
/// So you can access it with: Get.find<Api>().fetchData;
/// You can dispose it with Get.delete<Api>(Api());
/// Only make the repository global if necessary, if you are going to use it on a single controller, there is no reason to make it global.
class HomeProvider {
Future<ApiModel> fetchData() async {
try {
final response = await Dio().get("https://api.covid19api.com/summary");
return ApiModel.fromJson(response.data);
} catch (e) {
print(e.toString());
return null;
return ApiModel();
}
}
}
... ...
import 'package:get_state/home/data/home_provider.dart';
import 'package:get_state/home/data/home_model.dart';
class HomeRepository {
HomeRepository(this.homeProvider);
final HomeProvider homeProvider;
Future<ApiModel> getData() async {
return homeProvider.fetchData();
}
}
... ...
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:get_state/home/controllers/home_controller.dart';
import 'package:get_state/home/models/home_model.dart';
import 'package:get_state/home/data/home_model.dart';
import 'package:get/get.dart';
class CountryPage extends StatelessWidget {
class CountryPage extends GetWidget<HomeController> {
@override
Widget build(BuildContext context) {
return Container(
... ... @@ -28,9 +28,9 @@ class CountryPage extends StatelessWidget {
),
body: Center(
child: ListView.builder(
itemCount: null,
itemCount: controller.data.value.countries.length,
itemBuilder: (context, index) {
Country country = Controller.to.data.countries[index];
Country country = controller.data.value.countries[index];
return ListTile(
onTap: () {
Get.toNamed('/details', arguments: country);
... ...
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_state/home/models/home_model.dart';
import 'package:get_state/home/data/home_model.dart';
class DetailsPage extends StatelessWidget {
@override
... ...
... ... @@ -3,10 +3,9 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_state/home/controllers/home_controller.dart';
class HomePage extends StatelessWidget {
class HomePage extends GetWidget<HomeController> {
@override
Widget build(BuildContext context) {
print("rebuild");
return Container(
decoration: BoxDecoration(
color: Colors.white,
... ... @@ -24,16 +23,9 @@ class HomePage extends StatelessWidget {
centerTitle: true,
),
body: Center(
child: GetBuilder<Controller>(
init: Controller(),
initState: (_) {
Controller.to.fetchDataFromApi();
},
builder: (_) {
if (_.data == null) {
return CircularProgressIndicator();
} else {
return Column(
child: Obx(() => (controller.data() == null)
? CircularProgressIndicator()
: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
... ... @@ -46,9 +38,9 @@ class HomePage extends StatelessWidget {
),
),
Text(
'${_.data.global.totalConfirmed}',
style: TextStyle(
fontSize: 45, fontWeight: FontWeight.bold),
'${controller.data.value.global.totalConfirmed}',
style:
TextStyle(fontSize: 45, fontWeight: FontWeight.bold),
),
SizedBox(
height: 10,
... ... @@ -60,9 +52,9 @@ class HomePage extends StatelessWidget {
),
),
Text(
'${_.data.global.totalDeaths}',
style: TextStyle(
fontSize: 45, fontWeight: FontWeight.bold),
'${controller.data.value.global.totalDeaths}',
style:
TextStyle(fontSize: 45, fontWeight: FontWeight.bold),
),
SizedBox(
height: 10,
... ... @@ -79,11 +71,10 @@ class HomePage extends StatelessWidget {
child: Text(
"Fetch by country",
style: TextStyle(fontWeight: FontWeight.bold),
))
),
)
],
);
}
}),
)),
),
),
);
... ...
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get_state/home/bindings/home_binding.dart';
import 'package:get_state/home/views/country_view.dart';
import 'home/views/details_view.dart';
import 'home/views/home_view.dart';
void main() {
runApp(GetMaterialApp(
runApp(
GetMaterialApp(
debugShowCheckedModeBanner: false,
initialRoute: '/',
namedRoutes: {
'/': GetRoute(page: HomePage()),
'/country': GetRoute(page: CountryPage()),
'/details': GetRoute(page: DetailsPage()),
},
));
getPages: [
GetPage(name: '/', page: () => HomePage(), binding: HomeBinding()),
GetPage(name: '/country', page: () => CountryPage()),
GetPage(name: '/details', page: () => DetailsPage()),
],
),
);
}
... ...
... ... @@ -5,5 +5,5 @@
#include "generated_plugin_registrant.h"
void RegisterPlugins(flutter::PluginRegistry* registry) {
void fl_register_plugins(FlPluginRegistry* registry) {
}
... ...
... ... @@ -5,9 +5,9 @@
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_
#include <flutter/plugin_registry.h>
#include <flutter_linux/flutter_linux.h>
// Registers Flutter plugins.
void RegisterPlugins(flutter::PluginRegistry* registry);
void fl_register_plugins(FlPluginRegistry* registry);
#endif // GENERATED_PLUGIN_REGISTRANT_
... ...
#
# Generated file, do not edit.
#
list(APPEND FLUTTER_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)
... ...
... ... @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
... ... @@ -15,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
charcode:
dependency: transitive
description:
... ... @@ -35,7 +42,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.12"
version: "1.14.13"
dio:
dependency: "direct main"
description:
... ... @@ -66,7 +73,7 @@ packages:
name: get
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8-dev"
version: "3.2.2"
http_parser:
dependency: transitive
description:
... ... @@ -80,7 +87,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.6"
version: "0.12.8"
meta:
dependency: transitive
description:
... ... @@ -113,7 +120,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
... ... @@ -141,14 +148,14 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.15"
version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.6"
version: "1.2.0"
vector_math:
dependency: transitive
description:
... ... @@ -157,4 +164,4 @@ packages:
source: hosted
version: "2.0.8"
sdks:
dart: ">=2.7.0 <3.0.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
... ...
... ... @@ -27,7 +27,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
get: ^2.0.8-dev
get: ^3.2.2
dio: ^3.0.9
dev_dependencies:
... ...
... ... @@ -3,14 +3,18 @@ import '../get_main.dart';
import 'get_instance.dart';
extension Inst on GetImpl {
void lazyPut<S>(FcBuilderFunc builder, {String tag}) {
return GetInstance().lazyPut<S>(builder, tag: tag);
void lazyPut<S>(FcBuilderFunc builder, {String tag, bool fenix = false}) {
return GetInstance().lazyPut<S>(builder, tag: tag, fenix: fenix);
}
Future<S> putAsync<S>(FcBuilderFuncAsync<S> builder,
{String tag, bool permanent = false}) async =>
GetInstance().putAsync<S>(builder, tag: tag, permanent: permanent);
void create<S>(FcBuilderFunc<S> builder,
{String name, bool permanent = true}) =>
GetInstance().create<S>(builder, name: name, permanent: permanent);
S find<S>({String tag, FcBuilderFunc<S> instance}) =>
GetInstance().find<S>(tag: tag, instance: instance);
... ...
... ... @@ -64,8 +64,10 @@ class GetInstance {
void create<S>(
FcBuilderFunc<S> builder, {
String name,
bool permanent = true,
}) {
_insert(isSingleton: false, name: name, builder: builder);
_insert(
isSingleton: false, name: name, builder: builder, permanent: permanent);
}
void _insert<S>({
... ... @@ -227,7 +229,8 @@ class GetInstance {
FcBuilder builder = GetConfig._singl[newKey] as FcBuilder;
if (builder.permanent) {
print('[GET] [$newKey] has been marked as permanent, SmartManagement is not authorized to delete it.');
print(
'[GET] [$newKey] has been marked as permanent, SmartManagement is not authorized to delete it.');
return false;
}
final i = builder.dependency;
... ...
... ... @@ -336,10 +336,9 @@ class GetPageRoute<T> extends PageRoute<T> {
child: child)
: child);
return FadeInTransition().buildTransitions(
return FadeUpwardsPageTransitionsBuilder().buildTransitions(
this,
context,
curve,
alignment,
animation,
secondaryAnimation,
popGesture ?? Get.defaultPopGesture
... ... @@ -364,10 +363,9 @@ class GetPageRoute<T> extends PageRoute<T> {
child: child)
: child);
return FadeInTransition().buildTransitions(
return FadeUpwardsPageTransitionsBuilder().buildTransitions(
this,
context,
curve,
alignment,
animation,
secondaryAnimation,
popGesture ?? Get.defaultPopGesture
... ...
import 'default_transitions.dart';
import 'transitions_component.dart';
import 'transitions_type.dart';
class TransitionFilter {
static TransitionComponent newTransitionComponent(
Transition transition,
) {
switch (transition) {
case Transition.leftToRight:
return SlideLeftTransition();
case Transition.downToUp:
return SlideDownTransition();
case Transition.upToDown:
return SlideTopTransition();
case Transition.rightToLeft:
return SlideRightTransition();
case Transition.zoom:
return ZoomInTransition();
case Transition.fadeIn:
return FadeInTransition();
case Transition.rightToLeftWithFade:
return RightToLeftFadeTransition();
case Transition.leftToRightWithFade:
return LeftToRightFadeTransition();
case Transition.cupertino:
return CupertinoTransitions();
case Transition.size:
return SizeTransitions();
default:
return FadeInTransition();
}
}
}
... ... @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
... ... @@ -99,7 +99,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.3"
version: "1.9.5"
stream_channel:
dependency: transitive
description:
... ...
name: get
description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
version: 3.2.2
version: 3.3.0
homepage: https://github.com/jonataslaw/get
environment:
... ...