Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Renat Fakhrutdinov
2020-09-28 21:36:27 +1000
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2020-09-28 21:36:27 +1000
Commit
c3ce4240172f0a52726cc3db472b6c55133a3fce
c3ce4240
2 parents
497fb74c
4eaf7b10
Merge pull request #9 from jonataslaw/master
update
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
116 additions
and
237 deletions
example/pubspec.lock
getx/example/pubspec.yaml
getx/lib/get.dart
getx/lib/instance_manager.dart
getx/lib/route_manager.dart
getx/lib/state_manager.dart
getx/lib/utils.dart
getx/pubspec.yaml
packages/get_instance/pubspec.yaml
packages/get_navigation/lib/src/snackbar/snack.dart
packages/get_navigation/lib/src/snackbar/snack_route.dart
packages/get_navigation/pubspec.yaml
packages/get_rx/pubspec.yaml
packages/get_state_manager/pubspec.yaml
packages/get_test/example/pubspec.yaml
packages/get_test/pubspec.yaml
packages/get_utils/lib/src/extensions/duration_extensions.dart
packages/get_utils/lib/src/extensions/internacionalization.dart
packages/get_utils/lib/src/extensions/num_extensions.dart
packages/get_utils/pubspec.yaml
example/pubspec.lock
deleted
100644 → 0
View file @
497fb74
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
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:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.13"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.10"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
get:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "3.10.2"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.8"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.5"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.17"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
sdks:
dart: ">=2.9.0-14.0.dev <3.0.0"
getx/example/pubspec.yaml
View file @
c3ce424
...
...
@@ -27,9 +27,16 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
get
:
path
:
../
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
getx
ref
:
master
dio
:
^3.0.9
get_test
:
^3.11.0
get_test
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_test
ref
:
master
dev_dependencies
:
flutter_test
:
sdk
:
flutter
...
...
getx/lib/get.dart
View file @
c3ce424
...
...
@@ -6,3 +6,4 @@ export 'package:get_instance/get_instance.dart';
export
'package:get_navigation/get_navigation.dart'
;
export
'package:get_utils/get_utils.dart'
;
export
'package:get_rx/get_rx.dart'
;
export
'package:get_test/get_test.dart'
;
...
...
getx/lib/instance_manager.dart
View file @
c3ce424
library
get
;
export
'package:get_instance/get_instance.dart'
;
...
...
getx/lib/route_manager.dart
View file @
c3ce424
library
get
;
export
'package:get_navigation/get_navigation.dart'
;
...
...
getx/lib/state_manager.dart
View file @
c3ce424
library
get
;
export
'package:get_rx/get_rx.dart'
;
export
'package:get_state_manager/get_state_manager.dart'
;
...
...
getx/lib/utils.dart
View file @
c3ce424
library
get
;
export
'package:get_utils/get_utils.dart'
;
...
...
getx/pubspec.yaml
View file @
c3ce424
...
...
@@ -9,12 +9,41 @@ environment:
dependencies
:
flutter
:
sdk
:
flutter
get_core
:
"
>=3.10.2
<4.0.0"
get_instance
:
"
>=3.10.2
<4.0.0"
get_rx
:
"
>=3.10.2
<4.0.0"
get_state_manager
:
"
>=3.10.2
<4.0.0"
get_navigation
:
"
>=3.10.2
<4.0.0"
get_utils
:
"
>=3.10.2
<4.0.0"
get_core
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_core
ref
:
master
get_instance
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_instance
ref
:
master
get_rx
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_rx
ref
:
master
get_state_manager
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_state_manager
ref
:
master
get_navigation
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_navigation
ref
:
master
get_utils
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_utils
ref
:
master
get_test
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_test
ref
:
master
dev_dependencies
:
...
...
packages/get_instance/pubspec.yaml
View file @
c3ce424
...
...
@@ -9,7 +9,10 @@ environment:
dependencies
:
get_core
:
path
:
../get_core
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_core
ref
:
master
dev_dependencies
:
test
:
"
>=1.0.0
<2.0.0"
...
...
packages/get_navigation/lib/src/snackbar/snack.dart
View file @
c3ce424
...
...
@@ -206,40 +206,6 @@ class GetBar<T extends Object> extends StatefulWidget {
return
await
Get
.
key
.
currentState
.
push
(
_snackRoute
);
}
/// Dismisses the snack causing is to return a future containing [result].
/// When this future finishes, it is guaranteed that Snack was dismissed.
Future
<
T
>
dismiss
([
T
result
])
async
{
// If route was never initialized, do nothing
if
(
_snackRoute
==
null
)
{
return
null
;
}
if
(
_snackRoute
.
isCurrent
)
{
_snackRoute
.
navigator
.
pop
(
result
);
return
_snackRoute
.
completed
;
}
else
if
(
_snackRoute
.
isActive
)
{
// removeRoute is called every time you dismiss a Snack that is not
// the top route.
// It will not animate back and listeners will not detect
// SnackbarStatus.CLOSING or SnackbarStatus.CLOSED
// To avoid this, always make sure that Snack is the top
// route when it is being dismissed
_snackRoute
.
navigator
.
removeRoute
(
_snackRoute
);
}
return
null
;
}
/// Checks if the snack is visible
bool
isShowing
()
{
return
_snackRoute
?.
currentStatus
==
SnackbarStatus
.
OPEN
;
}
/// Checks if the snack is dismissed
bool
isDismissed
()
{
return
_snackRoute
?.
currentStatus
==
SnackbarStatus
.
CLOSED
;
}
@override
State
createState
()
{
return
_GetBarState
<
T
>();
...
...
@@ -273,8 +239,9 @@ class _GetBarState<K extends Object> extends State<GetBar>
((
widget
.
userInputForm
!=
null
||
((
widget
.
message
!=
null
&&
widget
.
message
.
isNotEmpty
)
||
widget
.
messageText
!=
null
))),
// ignore: lines_longer_than_80_chars
"A message is mandatory if you are not using userInputForm. Set either a message or messageText"
);
"""
A message is mandatory if you are not using userInputForm.
Set either a message or messageText"""
);
_isTitlePresent
=
(
widget
.
title
!=
null
||
widget
.
titleText
!=
null
);
_messageTopMargin
=
_isTitlePresent
?
6.0
:
widget
.
padding
.
top
;
...
...
packages/get_navigation/lib/src/snackbar/snack_route.dart
View file @
c3ce424
import
'dart:async'
;
import
'dart:ui'
;
import
'package:flutter/widgets.dart'
;
import
'../../get_navigation.dart'
;
import
'snack.dart'
;
class
SnackRoute
<
T
>
extends
OverlayRoute
<
T
>
{
...
...
@@ -65,7 +64,7 @@ class SnackRoute<T> extends OverlayRoute<T> {
OverlayEntry
(
builder:
(
context
)
{
return
GestureDetector
(
onTap:
snack
.
isDismissible
?
()
=>
snack
.
dismiss
()
:
null
,
onTap:
snack
.
isDismissible
?
Get
.
back
:
null
,
child:
AnimatedBuilder
(
animation:
_filterBlurAnimation
,
builder:
(
context
,
child
)
{
...
...
packages/get_navigation/pubspec.yaml
View file @
c3ce424
...
...
@@ -11,11 +11,20 @@ dependencies:
flutter
:
sdk
:
flutter
get_state_manager
:
path
:
../get_state_manager
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_state_manager
ref
:
master
get_core
:
path
:
../get_core
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_core
ref
:
master
get_utils
:
path
:
../get_utils
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_utils
ref
:
master
dev_dependencies
:
flutter_test
:
...
...
packages/get_rx/pubspec.yaml
View file @
c3ce424
...
...
@@ -9,9 +9,15 @@ environment:
dependencies
:
get_core
:
path
:
../get_core
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_core
ref
:
master
get_instance
:
path
:
../get_instance
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_instance
ref
:
master
meta
:
"
>=1.1.0
<2.0.0"
...
...
packages/get_state_manager/pubspec.yaml
View file @
c3ce424
...
...
@@ -11,11 +11,20 @@ dependencies:
flutter
:
sdk
:
flutter
get_rx
:
path
:
../get_rx
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_rx
ref
:
master
get_instance
:
path
:
../get_instance
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_instance
ref
:
master
get_core
:
path
:
../get_core
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_core
ref
:
master
dev_dependencies
:
flutter_test
:
...
...
packages/get_test/example/pubspec.yaml
View file @
c3ce424
...
...
@@ -26,6 +26,7 @@ dependencies:
get_test
:
path
:
../
get
:
path
:
../../../getx
# The following adds the Cupertino Icons font to your application.
...
...
packages/get_test/pubspec.yaml
View file @
c3ce424
...
...
@@ -11,8 +11,16 @@ dependencies:
flutter
:
sdk
:
flutter
mockito
:
"
>=3.0.0
<4.0.0"
get_navigation
:
"
>=3.10.2
<4.0.0"
get_state_manager
:
"
>=3.10.2
<4.0.0"
get_navigation
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_navigation
ref
:
master
get_state_manager
:
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_state_manager
ref
:
master
image_test_utils
:
"
>=1.0.0
<2.0.0"
flutter_test
:
sdk
:
flutter
...
...
packages/get_utils/lib/src/extensions/duration_extensions.dart
View file @
c3ce424
import
'dart:
ui
'
;
import
'dart:
async
'
;
/// Duration utilities.
extension
GetDurationUtils
on
Duration
{
...
...
@@ -15,5 +15,5 @@ extension GetDurationUtils on Duration {
/// await 0.7.seconds.delay(() {
/// }
///```
Future
delay
([
VoidCallback
callback
])
async
=>
Future
.
delayed
(
this
,
callback
);
Future
delay
([
FutureOr
callback
()
])
async
=>
Future
.
delayed
(
this
,
callback
);
}
...
...
packages/get_utils/lib/src/extensions/internacionalization.dart
View file @
c3ce424
...
...
@@ -66,13 +66,9 @@ extension LocalesIntl on GetInterface {
Locale
get
fallbackLocale
=>
_intlHost
.
fallbackLocale
;
set
locale
(
Locale
newLocale
)
{
_intlHost
.
locale
=
newLocale
;
}
set
locale
(
Locale
newLocale
)
=>
_intlHost
.
locale
=
newLocale
;
set
fallbackLocale
(
Locale
newLocale
)
{
_intlHost
.
fallbackLocale
=
newLocale
;
}
set
fallbackLocale
(
Locale
newLocale
)
=>
_intlHost
.
fallbackLocale
=
newLocale
;
Map
<
String
,
Map
<
String
,
String
>>
get
translations
=>
_intlHost
.
translations
;
...
...
packages/get_utils/lib/src/extensions/num_extensions.dart
View file @
c3ce424
import
'dart:ui'
;
import
'dart:async'
;
import
'../get_utils/get_utils.dart'
;
extension
GetNumUtils
on
num
{
...
...
@@ -24,7 +23,7 @@ extension GetNumUtils on num {
/// print('currently running callback 1.2sec');
/// }
///```
Future
delay
([
VoidCallback
callback
])
async
=>
Future
.
delayed
(
Future
delay
([
FutureOr
callback
()
])
async
=>
Future
.
delayed
(
Duration
(
milliseconds:
(
this
*
1000
).
round
()),
callback
,
);
...
...
packages/get_utils/pubspec.yaml
View file @
c3ce424
...
...
@@ -11,7 +11,11 @@ dependencies:
flutter
:
sdk
:
flutter
get_core
:
path
:
../get_core
git
:
url
:
git://github.com/jonataslaw/getx.git
path
:
packages/get_core
ref
:
master
meta
:
"
>=1.1.0
<2.0.0"
dev_dependencies
:
flutter_test
:
...
...
Please
register
or
login
to post a comment