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
ba93987c
Commit
ba93987c
authored
Feb 24, 2016
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added bottom_sheet_rebuild_test
parent
1062c44f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
bottom_sheet_rebuild_test.dart
packages/flutter/test/widget/bottom_sheet_rebuild_test.dart
+45
-0
No files found.
packages/flutter/test/widget/bottom_sheet_rebuild_test.dart
0 → 100644
View file @
ba93987c
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter/material.dart'
;
import
'package:test/test.dart'
;
void
main
(
)
{
test
(
'Verify that a BottomSheet can be rebuilt with ScaffoldFeatureController.setState()'
,
()
{
testWidgets
((
WidgetTester
tester
)
{
final
GlobalKey
<
ScaffoldState
>
scaffoldKey
=
new
GlobalKey
<
ScaffoldState
>();
ScaffoldFeatureController
bottomSheet
;
int
buildCount
=
0
;
tester
.
pumpWidget
(
new
MaterialApp
(
routes:
<
String
,
RouteBuilder
>{
'/'
:
(
RouteArguments
args
)
{
return
new
Scaffold
(
key:
scaffoldKey
,
body:
new
Center
(
child:
new
Text
(
'body'
))
);
}
}
));
bottomSheet
=
scaffoldKey
.
currentState
.
showBottomSheet
((
_
)
{
return
new
Builder
(
builder:
(
_
)
{
buildCount
+=
1
;
return
new
Container
(
height:
200.0
);
}
);
});
tester
.
pump
();
expect
(
buildCount
,
equals
(
1
));
bottomSheet
.
setState
((){
});
tester
.
pump
();
expect
(
buildCount
,
equals
(
2
));
});
});
}
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