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
Ahmed Fwela
2021-10-05 02:59:12 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5f12b0764120e7507b8e481ce072b728b049a21f
5f12b076
1 parent
eb4357e2
fix responsiveValue 3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
lib/get_utils/src/extensions/context_extensions.dart
lib/get_utils/src/extensions/context_extensions.dart
View file @
5f12b07
...
...
@@ -130,12 +130,18 @@ extension ContextExtensionss on BuildContext {
deviceWidth
=
mediaQuerySize
.
width
;
}
//big screen width can display smaller sizes
final
v
alues
=
[
final
strictV
alues
=
[
if
(
deviceWidth
>=
1200
)
desktop
,
//desktop is allowed
if
(
deviceWidth
>=
600
)
tablet
,
//tablet is allowed
if
(
deviceWidth
>=
300
)
mobile
,
//mobile is allowed
watch
,
//watch is allowed
];
return
values
.
whereType
<
T
>().
first
;
].
whereType
<
T
>();
final
looseValues
=
[
watch
,
mobile
,
tablet
,
desktop
,
].
whereType
<
T
>();
return
strictValues
.
firstOrNull
??
looseValues
.
first
;
}
}
...
...
Please
register
or
login
to post a comment