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
419be223
Unverified
Commit
419be223
authored
Oct 30, 2018
by
Hans Muller
Committed by
GitHub
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More debugCheckHasMaterialLocalizations() asserts (#23740)
parent
a2c9dd81
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
2 deletions
+14
-2
back_button.dart
packages/flutter/lib/src/material/back_button.dart
+1
-0
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+2
-1
stepper.dart
packages/flutter/lib/src/material/stepper.dart
+1
-0
tabs.dart
packages/flutter/lib/src/material/tabs.dart
+1
-0
text_selection.dart
packages/flutter/lib/src/material/text_selection.dart
+2
-0
time.dart
packages/flutter/lib/src/material/time.dart
+5
-1
time_picker.dart
packages/flutter/lib/src/material/time_picker.dart
+2
-0
No files found.
packages/flutter/lib/src/material/back_button.dart
View file @
419be223
...
...
@@ -116,6 +116,7 @@ class CloseButton extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
assert
(
debugCheckHasMaterialLocalizations
(
context
));
return
IconButton
(
icon:
const
Icon
(
Icons
.
close
),
tooltip:
MaterialLocalizations
.
of
(
context
).
closeButtonTooltip
,
...
...
packages/flutter/lib/src/material/date_picker.dart
View file @
419be223
...
...
@@ -943,7 +943,6 @@ class _DatePickerDialogState extends State<_DatePickerDialog> {
@override
Widget
build
(
BuildContext
context
)
{
assert
(
debugCheckHasMaterialLocalizations
(
context
));
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
Widget
picker
=
Flexible
(
child:
SizedBox
(
...
...
@@ -1086,6 +1085,8 @@ Future<DateTime> showDatePicker({
'Provided initialDate must satisfy provided selectableDayPredicate'
);
assert
(
initialDatePickerMode
!=
null
,
'initialDatePickerMode must not be null'
);
assert
(
context
!=
null
);
assert
(
debugCheckHasMaterialLocalizations
(
context
));
Widget
child
=
_DatePickerDialog
(
initialDate:
initialDate
,
...
...
packages/flutter/lib/src/material/stepper.dart
View file @
419be223
...
...
@@ -670,6 +670,7 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
@override
Widget
build
(
BuildContext
context
)
{
assert
(
debugCheckHasMaterial
(
context
));
assert
(
debugCheckHasMaterialLocalizations
(
context
));
assert
(()
{
if
(
context
.
ancestorWidgetOfExactType
(
Stepper
)
!=
null
)
throw
FlutterError
(
...
...
packages/flutter/lib/src/material/tabs.dart
View file @
419be223
...
...
@@ -899,6 +899,7 @@ class _TabBarState extends State<TabBar> {
@override
Widget
build
(
BuildContext
context
)
{
assert
(
debugCheckHasMaterialLocalizations
(
context
));
final
MaterialLocalizations
localizations
=
MaterialLocalizations
.
of
(
context
);
if
(
_controller
.
length
==
0
)
{
return
Container
(
...
...
packages/flutter/lib/src/material/text_selection.dart
View file @
419be223
...
...
@@ -7,6 +7,7 @@ import 'dart:math' as math;
import
'package:flutter/widgets.dart'
;
import
'package:flutter/rendering.dart'
;
import
'debug.dart'
;
import
'flat_button.dart'
;
import
'material.dart'
;
import
'material_localizations.dart'
;
...
...
@@ -132,6 +133,7 @@ class _MaterialTextSelectionControls extends TextSelectionControls {
@override
Widget
buildToolbar
(
BuildContext
context
,
Rect
globalEditableRegion
,
Offset
position
,
TextSelectionDelegate
delegate
)
{
assert
(
debugCheckHasMediaQuery
(
context
));
assert
(
debugCheckHasMaterialLocalizations
(
context
));
return
ConstrainedBox
(
constraints:
BoxConstraints
.
tight
(
globalEditableRegion
.
size
),
child:
CustomSingleChildLayout
(
...
...
packages/flutter/lib/src/material/time.dart
View file @
419be223
...
...
@@ -3,10 +3,13 @@
// found in the LICENSE file.
import
'dart:ui'
show
hashValues
;
import
'package:flutter/widgets.dart'
;
import
'debug.dart'
;
import
'material_localizations.dart'
;
/// Whether the [TimeOfDay] is before or after noon.
enum
DayPeriod
{
/// Ante meridiem (before noon).
...
...
@@ -96,7 +99,8 @@ class TimeOfDay {
///
/// This is a shortcut for [MaterialLocalizations.formatTimeOfDay].
String
format
(
BuildContext
context
)
{
debugCheckHasMediaQuery
(
context
);
assert
(
debugCheckHasMediaQuery
(
context
));
assert
(
debugCheckHasMaterialLocalizations
(
context
));
final
MaterialLocalizations
localizations
=
MaterialLocalizations
.
of
(
context
);
return
localizations
.
formatTimeOfDay
(
this
,
...
...
packages/flutter/lib/src/material/time_picker.dart
View file @
419be223
...
...
@@ -12,6 +12,7 @@ import 'package:flutter/widgets.dart';
import
'button_bar.dart'
;
import
'button_theme.dart'
;
import
'colors.dart'
;
import
'debug.dart'
;
import
'dialog.dart'
;
import
'feedback.dart'
;
import
'flat_button.dart'
;
...
...
@@ -1672,6 +1673,7 @@ Future<TimeOfDay> showTimePicker({
})
async
{
assert
(
context
!=
null
);
assert
(
initialTime
!=
null
);
assert
(
debugCheckHasMaterialLocalizations
(
context
));
return
await
showDialog
<
TimeOfDay
>(
context:
context
,
...
...
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