Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
0c1652f4
Unverified
Commit
0c1652f4
authored
Apr 20, 2021
by
Abhishek Ghaskata
Committed by
GitHub
Apr 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate flavors to null safety (#80558)
parent
ecbea9a9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
main.dart
dev/integration_tests/flavors/lib/main.dart
+4
-4
pubspec.yaml
dev/integration_tests/flavors/pubspec.yaml
+1
-1
main_test.dart
dev/integration_tests/flavors/test_driver/main_test.dart
+2
-2
No files found.
dev/integration_tests/flavors/lib/main.dart
View file @
0c1652f4
...
...
@@ -12,19 +12,19 @@ void main() {
}
class
Flavor
extends
StatefulWidget
{
const
Flavor
({
Key
key
})
:
super
(
key:
key
);
const
Flavor
({
Key
?
key
})
:
super
(
key:
key
);
@override
_FlavorState
createState
()
=>
_FlavorState
();
}
class
_FlavorState
extends
State
<
Flavor
>
{
String
_flavor
;
String
?
_flavor
;
@override
void
initState
()
{
super
.
initState
();
const
MethodChannel
(
'flavor'
).
invokeMethod
<
String
>(
'getFlavor'
).
then
((
String
flavor
)
{
const
MethodChannel
(
'flavor'
).
invokeMethod
<
String
>(
'getFlavor'
).
then
((
String
?
flavor
)
{
setState
(()
{
_flavor
=
flavor
;
});
...
...
@@ -37,7 +37,7 @@ class _FlavorState extends State<Flavor> {
textDirection:
TextDirection
.
ltr
,
child:
_flavor
==
null
?
const
Text
(
'Awaiting flavor...'
)
:
Text
(
_flavor
,
key:
const
ValueKey
<
String
>(
'flavor'
)),
:
Text
(
_flavor
!
,
key:
const
ValueKey
<
String
>(
'flavor'
)),
);
}
}
dev/integration_tests/flavors/pubspec.yaml
View file @
0c1652f4
...
...
@@ -2,7 +2,7 @@ name: flavors
description
:
Integration test for build flavors.
environment
:
sdk
:
"
>=2.
0.0-dev.68
.0
<3.0.0"
sdk
:
"
>=2.
12
.0
<3.0.0"
dependencies
:
flutter
:
...
...
dev/integration_tests/flavors/test_driver/main_test.dart
View file @
0c1652f4
...
...
@@ -7,7 +7,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void
main
(
)
{
group
(
'flavors suite'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
...
...
@@ -20,7 +20,7 @@ void main() {
});
tearDownAll
(()
async
{
driver
?
.
close
();
driver
.
close
();
});
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment