Add space before curly parentheses. (#85306)
This commit is contained in:
parent
76db0d7428
commit
a3dc90c4f5
@ -24,7 +24,7 @@ class _CullOpacityPageState extends State<CullOpacityPage> with SingleTickerProv
|
|||||||
// This code uses a manual listener for historical reasons and will remain
|
// This code uses a manual listener for historical reasons and will remain
|
||||||
// in order to preserve compatibility with the history of measurements for
|
// in order to preserve compatibility with the history of measurements for
|
||||||
// this benchmark.
|
// this benchmark.
|
||||||
_offsetY = Tween<double>(begin: 0, end: -1000.0).animate(_controller)..addListener((){
|
_offsetY = Tween<double>(begin: 0, end: -1000.0).animate(_controller)..addListener(() {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
});
|
});
|
||||||
_controller.repeat();
|
_controller.repeat();
|
||||||
|
@ -44,7 +44,7 @@ class _LifeCycleSpyState extends State<LifeCycleSpy> with WidgetsBindingObserver
|
|||||||
List<AppLifecycleState?>? _actualLifeCycleSequence;
|
List<AppLifecycleState?>? _actualLifeCycleSequence;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(){
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance?.addObserver(this);
|
WidgetsBinding.instance?.addObserver(this);
|
||||||
_actualLifeCycleSequence = <AppLifecycleState?>[
|
_actualLifeCycleSequence = <AppLifecycleState?>[
|
||||||
|
@ -370,7 +370,7 @@ class LogicalKeyData {
|
|||||||
}();
|
}();
|
||||||
|
|
||||||
/// Returns the static map of printable representations.
|
/// Returns the static map of printable representations.
|
||||||
static late final Map<String, String> printable = ((){
|
static late final Map<String, String> printable = (() {
|
||||||
final String printableKeys = File(path.join(dataRoot, 'printable.json',)).readAsStringSync();
|
final String printableKeys = File(path.join(dataRoot, 'printable.json',)).readAsStringSync();
|
||||||
return (json.decode(printableKeys) as Map<String, dynamic>)
|
return (json.decode(printableKeys) as Map<String, dynamic>)
|
||||||
.cast<String, String>();
|
.cast<String, String>();
|
||||||
@ -389,7 +389,7 @@ class LogicalKeyData {
|
|||||||
/// These include synonyms for keys which don't have printable
|
/// These include synonyms for keys which don't have printable
|
||||||
/// representations, and appear in more than one place on the keyboard (e.g.
|
/// representations, and appear in more than one place on the keyboard (e.g.
|
||||||
/// SHIFT, ALT, etc.).
|
/// SHIFT, ALT, etc.).
|
||||||
static late final Map<String, List<String>> synonyms = ((){
|
static late final Map<String, List<String>> synonyms = (() {
|
||||||
final String synonymKeys = File(path.join(dataRoot, 'synonyms.json',)).readAsStringSync();
|
final String synonymKeys = File(path.join(dataRoot, 'synonyms.json',)).readAsStringSync();
|
||||||
final Map<String, dynamic> dynamicSynonym = json.decode(synonymKeys) as Map<String, dynamic>;
|
final Map<String, dynamic> dynamicSynonym = json.decode(synonymKeys) as Map<String, dynamic>;
|
||||||
return dynamicSynonym.map((String name, dynamic values) {
|
return dynamicSynonym.map((String name, dynamic values) {
|
||||||
|
@ -364,7 +364,7 @@ class PhysicalKeyEntry {
|
|||||||
/// the name from the various different names available, making sure that the
|
/// the name from the various different names available, making sure that the
|
||||||
/// name isn't a Dart reserved word (if it is, then it adds the word "Key" to
|
/// name isn't a Dart reserved word (if it is, then it adds the word "Key" to
|
||||||
/// the end of the name).
|
/// the end of the name).
|
||||||
late final String constantName = ((){
|
late final String constantName = (() {
|
||||||
String? result;
|
String? result;
|
||||||
if (name.isEmpty) {
|
if (name.isEmpty) {
|
||||||
// If it doesn't have a DomKey name then use the Chromium symbol name.
|
// If it doesn't have a DomKey name then use the Chromium symbol name.
|
||||||
|
@ -1986,7 +1986,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
|
|||||||
// label on top of it.
|
// label on top of it.
|
||||||
List<Widget> columns;
|
List<Widget> columns;
|
||||||
|
|
||||||
if (widget.mode == CupertinoTimerPickerMode.hms){
|
if (widget.mode == CupertinoTimerPickerMode.hms) {
|
||||||
// Pad the widget to make it as wide as `_kPickerWidth`.
|
// Pad the widget to make it as wide as `_kPickerWidth`.
|
||||||
pickerColumnWidth =
|
pickerColumnWidth =
|
||||||
_kTimerPickerColumnIntrinsicWidth + (_kTimerPickerHalfColumnPadding * 2);
|
_kTimerPickerColumnIntrinsicWidth + (_kTimerPickerHalfColumnPadding * 2);
|
||||||
|
@ -1237,7 +1237,7 @@ class _FlutterErrorDetailsNode extends DiagnosticableNode<FlutterErrorDetails> {
|
|||||||
@override
|
@override
|
||||||
DiagnosticPropertiesBuilder? get builder {
|
DiagnosticPropertiesBuilder? get builder {
|
||||||
final DiagnosticPropertiesBuilder? builder = super.builder;
|
final DiagnosticPropertiesBuilder? builder = super.builder;
|
||||||
if (builder == null){
|
if (builder == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Iterable<DiagnosticsNode> properties = builder.properties;
|
Iterable<DiagnosticsNode> properties = builder.properties;
|
||||||
|
@ -348,7 +348,7 @@ class ChangeNotifier implements Listenable {
|
|||||||
if (_listeners[i] == null) {
|
if (_listeners[i] == null) {
|
||||||
// We swap this item with the next not null item.
|
// We swap this item with the next not null item.
|
||||||
int swapIndex = i + 1;
|
int swapIndex = i + 1;
|
||||||
while(_listeners[swapIndex] == null){
|
while(_listeners[swapIndex] == null) {
|
||||||
swapIndex += 1;
|
swapIndex += 1;
|
||||||
}
|
}
|
||||||
_listeners[i] = _listeners[swapIndex];
|
_listeners[i] = _listeners[swapIndex];
|
||||||
|
@ -1835,7 +1835,7 @@ class _RawChipState extends State<RawChip> with MaterialStateMixin, TickerProvid
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget? _wrapWithTooltip(String? tooltip, VoidCallback? callback, Widget? child) {
|
Widget? _wrapWithTooltip(String? tooltip, VoidCallback? callback, Widget? child) {
|
||||||
if(!widget.useDeleteButtonTooltip){
|
if(!widget.useDeleteButtonTooltip) {
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
if (child == null || callback == null || tooltip == null) {
|
if (child == null || callback == null || tooltip == null) {
|
||||||
|
@ -35,7 +35,7 @@ import 'theme.dart';
|
|||||||
/// final List<int> _items = List<int>.generate(50, (int index) => index);
|
/// final List<int> _items = List<int>.generate(50, (int index) => index);
|
||||||
///
|
///
|
||||||
/// @override
|
/// @override
|
||||||
/// Widget build(BuildContext context){
|
/// Widget build(BuildContext context) {
|
||||||
/// final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
/// final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||||
/// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
|
/// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
|
||||||
/// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
|
/// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
|
||||||
@ -238,7 +238,7 @@ class ReorderableListView extends StatefulWidget {
|
|||||||
/// final List<int> _items = List<int>.generate(50, (int index) => index);
|
/// final List<int> _items = List<int>.generate(50, (int index) => index);
|
||||||
///
|
///
|
||||||
/// @override
|
/// @override
|
||||||
/// Widget build(BuildContext context){
|
/// Widget build(BuildContext context) {
|
||||||
/// final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
/// final ColorScheme colorScheme = Theme.of(context).colorScheme;
|
||||||
/// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
|
/// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
|
||||||
/// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
|
/// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
|
||||||
|
@ -119,7 +119,7 @@ import 'constants.dart';
|
|||||||
/// ),
|
/// ),
|
||||||
/// ),
|
/// ),
|
||||||
/// body: TabBarView(
|
/// body: TabBarView(
|
||||||
/// children: tabs.map((Tab tab){
|
/// children: tabs.map((Tab tab) {
|
||||||
/// return Center(
|
/// return Center(
|
||||||
/// child: Text(
|
/// child: Text(
|
||||||
/// '${tab.text!} Tab',
|
/// '${tab.text!} Tab',
|
||||||
|
@ -2325,7 +2325,7 @@ class VisualDensity with Diagnosticable {
|
|||||||
///
|
///
|
||||||
/// The resulting minWidth and minHeight values are clamped to not exceed the
|
/// The resulting minWidth and minHeight values are clamped to not exceed the
|
||||||
/// maxWidth and maxHeight values, respectively.
|
/// maxWidth and maxHeight values, respectively.
|
||||||
BoxConstraints effectiveConstraints(BoxConstraints constraints){
|
BoxConstraints effectiveConstraints(BoxConstraints constraints) {
|
||||||
assert(constraints != null && constraints.debugAssertIsValid());
|
assert(constraints != null && constraints.debugAssertIsValid());
|
||||||
return constraints.copyWith(
|
return constraints.copyWith(
|
||||||
minWidth: (constraints.minWidth + baseSizeAdjustment.dx).clamp(0.0, constraints.maxWidth),
|
minWidth: (constraints.minWidth + baseSizeAdjustment.dx).clamp(0.0, constraints.maxWidth),
|
||||||
|
@ -327,7 +327,7 @@ class _TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
|
|||||||
}
|
}
|
||||||
final bool mouseIsConnected = RendererBinding.instance!.mouseTracker.mouseIsConnected;
|
final bool mouseIsConnected = RendererBinding.instance!.mouseTracker.mouseIsConnected;
|
||||||
if (mouseIsConnected != _mouseIsConnected) {
|
if (mouseIsConnected != _mouseIsConnected) {
|
||||||
setState((){
|
setState(() {
|
||||||
_mouseIsConnected = mouseIsConnected;
|
_mouseIsConnected = mouseIsConnected;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -718,7 +718,7 @@ abstract class ImageStreamCompleter with Diagnosticable {
|
|||||||
/// [ImageStreamListener.onChunk] specified) to notify them of a new
|
/// [ImageStreamListener.onChunk] specified) to notify them of a new
|
||||||
/// [ImageChunkEvent].
|
/// [ImageChunkEvent].
|
||||||
@protected
|
@protected
|
||||||
void reportImageChunkEvent(ImageChunkEvent event){
|
void reportImageChunkEvent(ImageChunkEvent event) {
|
||||||
_checkDisposed();
|
_checkDisposed();
|
||||||
if (hasListeners) {
|
if (hasListeners) {
|
||||||
// Make a copy to allow for concurrent modification.
|
// Make a copy to allow for concurrent modification.
|
||||||
|
@ -2527,7 +2527,7 @@ class FollowerLayer extends ContainerLayer {
|
|||||||
if (a.depth < b.depth) {
|
if (a.depth < b.depth) {
|
||||||
ancestorsB.add(b.parent);
|
ancestorsB.add(b.parent);
|
||||||
return _pathsToCommonAncestor(a, b.parent, ancestorsA, ancestorsB);
|
return _pathsToCommonAncestor(a, b.parent, ancestorsA, ancestorsB);
|
||||||
} else if (a.depth > b.depth){
|
} else if (a.depth > b.depth) {
|
||||||
ancestorsA.add(a.parent);
|
ancestorsA.add(a.parent);
|
||||||
return _pathsToCommonAncestor(a.parent, b, ancestorsA, ancestorsB);
|
return _pathsToCommonAncestor(a.parent, b, ancestorsA, ancestorsB);
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ abstract class RenderSliverFixedExtentBoxAdaptor extends RenderSliverMultiBoxAda
|
|||||||
int _calculateLeadingGarbage(int firstIndex) {
|
int _calculateLeadingGarbage(int firstIndex) {
|
||||||
RenderBox? walker = firstChild;
|
RenderBox? walker = firstChild;
|
||||||
int leadingGarbage = 0;
|
int leadingGarbage = 0;
|
||||||
while(walker != null && indexOf(walker) < firstIndex){
|
while(walker != null && indexOf(walker) < firstIndex) {
|
||||||
leadingGarbage += 1;
|
leadingGarbage += 1;
|
||||||
walker = childAfter(walker);
|
walker = childAfter(walker);
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ abstract class RenderSliverFixedExtentBoxAdaptor extends RenderSliverMultiBoxAda
|
|||||||
int _calculateTrailingGarbage(int targetLastIndex) {
|
int _calculateTrailingGarbage(int targetLastIndex) {
|
||||||
RenderBox? walker = lastChild;
|
RenderBox? walker = lastChild;
|
||||||
int trailingGarbage = 0;
|
int trailingGarbage = 0;
|
||||||
while(walker != null && indexOf(walker) > targetLastIndex){
|
while(walker != null && indexOf(walker) > targetLastIndex) {
|
||||||
trailingGarbage += 1;
|
trailingGarbage += 1;
|
||||||
walker = childBefore(walker);
|
walker = childBefore(walker);
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver
|
|||||||
/// Verify that the child list index is in strictly increasing order.
|
/// Verify that the child list index is in strictly increasing order.
|
||||||
///
|
///
|
||||||
/// This has no effect in release builds.
|
/// This has no effect in release builds.
|
||||||
bool _debugVerifyChildOrder(){
|
bool _debugVerifyChildOrder() {
|
||||||
if (_debugChildIntegrityEnabled) {
|
if (_debugChildIntegrityEnabled) {
|
||||||
RenderBox? child = firstChild;
|
RenderBox? child = firstChild;
|
||||||
int index;
|
int index;
|
||||||
|
@ -170,7 +170,7 @@ abstract class RawKeyEventData {
|
|||||||
if (side != null) {
|
if (side != null) {
|
||||||
result[key] = side;
|
result[key] = side;
|
||||||
}
|
}
|
||||||
assert((){
|
assert(() {
|
||||||
if (side == null) {
|
if (side == null) {
|
||||||
debugPrint(
|
debugPrint(
|
||||||
'Raw key data is returning inconsistent information for '
|
'Raw key data is returning inconsistent information for '
|
||||||
@ -767,7 +767,7 @@ class RawKeyboard {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Set<PhysicalKeyboardKey>? mappedKeys = _modifierKeyMap[_ModifierSidePair(key, modifiersPressed[key])];
|
final Set<PhysicalKeyboardKey>? mappedKeys = _modifierKeyMap[_ModifierSidePair(key, modifiersPressed[key])];
|
||||||
assert((){
|
assert(() {
|
||||||
if (mappedKeys == null) {
|
if (mappedKeys == null) {
|
||||||
debugPrint(
|
debugPrint(
|
||||||
'Platform key support for ${Platform.operatingSystem} is '
|
'Platform key support for ${Platform.operatingSystem} is '
|
||||||
|
@ -402,7 +402,7 @@ class AnimatedList extends StatefulWidget {
|
|||||||
static AnimatedListState of(BuildContext context) {
|
static AnimatedListState of(BuildContext context) {
|
||||||
assert(context != null);
|
assert(context != null);
|
||||||
final AnimatedListState? result = context.findAncestorStateOfType<AnimatedListState>();
|
final AnimatedListState? result = context.findAncestorStateOfType<AnimatedListState>();
|
||||||
assert((){
|
assert(() {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||||
ErrorSummary('AnimatedList.of() called with a context that does not contain an AnimatedList.'),
|
ErrorSummary('AnimatedList.of() called with a context that does not contain an AnimatedList.'),
|
||||||
@ -822,7 +822,7 @@ class SliverAnimatedList extends StatefulWidget {
|
|||||||
static SliverAnimatedListState of(BuildContext context) {
|
static SliverAnimatedListState of(BuildContext context) {
|
||||||
assert(context != null);
|
assert(context != null);
|
||||||
final SliverAnimatedListState? result = context.findAncestorStateOfType<SliverAnimatedListState>();
|
final SliverAnimatedListState? result = context.findAncestorStateOfType<SliverAnimatedListState>();
|
||||||
assert((){
|
assert(() {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
'SliverAnimatedList.of() called with a context that does not contain a SliverAnimatedList.\n'
|
'SliverAnimatedList.of() called with a context that does not contain a SliverAnimatedList.\n'
|
||||||
|
@ -1836,7 +1836,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void updateFloatingCursor(RawFloatingCursorPoint point) {
|
void updateFloatingCursor(RawFloatingCursorPoint point) {
|
||||||
switch(point.state){
|
switch(point.state) {
|
||||||
case FloatingCursorDragState.Start:
|
case FloatingCursorDragState.Start:
|
||||||
if (_floatingCursorResetController.isAnimating) {
|
if (_floatingCursorResetController.isAnimating) {
|
||||||
_floatingCursorResetController.stop();
|
_floatingCursorResetController.stop();
|
||||||
|
@ -1425,7 +1425,7 @@ class FocusTraversalOrder extends InheritedWidget {
|
|||||||
static FocusOrder of(BuildContext context) {
|
static FocusOrder of(BuildContext context) {
|
||||||
assert(context != null);
|
assert(context != null);
|
||||||
final FocusTraversalOrder? marker = context.getElementForInheritedWidgetOfExactType<FocusTraversalOrder>()?.widget as FocusTraversalOrder?;
|
final FocusTraversalOrder? marker = context.getElementForInheritedWidgetOfExactType<FocusTraversalOrder>()?.widget as FocusTraversalOrder?;
|
||||||
assert((){
|
assert(() {
|
||||||
if (marker == null) {
|
if (marker == null) {
|
||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
'FocusTraversalOrder.of() was called with a context that '
|
'FocusTraversalOrder.of() was called with a context that '
|
||||||
|
@ -3363,7 +3363,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
assert((){
|
assert(() {
|
||||||
if (widget.pages != const <Page<dynamic>>[]) {
|
if (widget.pages != const <Page<dynamic>>[]) {
|
||||||
// This navigator uses page API.
|
// This navigator uses page API.
|
||||||
if (widget.pages.isEmpty) {
|
if (widget.pages.isEmpty) {
|
||||||
@ -3564,7 +3564,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
|
|||||||
@override
|
@override
|
||||||
void didUpdateWidget(Navigator oldWidget) {
|
void didUpdateWidget(Navigator oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
assert((){
|
assert(() {
|
||||||
if (widget.pages != const <Page<dynamic>>[]) {
|
if (widget.pages != const <Page<dynamic>>[]) {
|
||||||
// This navigator uses page API.
|
// This navigator uses page API.
|
||||||
if (widget.pages.isEmpty) {
|
if (widget.pages.isEmpty) {
|
||||||
@ -3603,7 +3603,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
|
|||||||
_updateEffectiveObservers();
|
_updateEffectiveObservers();
|
||||||
}
|
}
|
||||||
if (oldWidget.pages != widget.pages && !restorePending) {
|
if (oldWidget.pages != widget.pages && !restorePending) {
|
||||||
assert((){
|
assert(() {
|
||||||
if (widget.pages.isEmpty) {
|
if (widget.pages.isEmpty) {
|
||||||
FlutterError.reportError(
|
FlutterError.reportError(
|
||||||
FlutterErrorDetails(
|
FlutterErrorDetails(
|
||||||
@ -3626,7 +3626,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _debugCheckDuplicatedPageKeys() {
|
void _debugCheckDuplicatedPageKeys() {
|
||||||
assert((){
|
assert(() {
|
||||||
final Set<Key> keyReservation = <Key>{};
|
final Set<Key> keyReservation = <Key>{};
|
||||||
for (final Page<dynamic> page in widget.pages) {
|
for (final Page<dynamic> page in widget.pages) {
|
||||||
final LocalKey? key = page.key;
|
final LocalKey? key = page.key;
|
||||||
@ -4513,7 +4513,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool _debugCheckIsPagelessRoute(Route<dynamic> route) {
|
bool _debugCheckIsPagelessRoute(Route<dynamic> route) {
|
||||||
assert((){
|
assert(() {
|
||||||
if (route.settings is Page) {
|
if (route.settings is Page) {
|
||||||
FlutterError.reportError(
|
FlutterError.reportError(
|
||||||
FlutterErrorDetails(
|
FlutterErrorDetails(
|
||||||
|
@ -899,7 +899,7 @@ class _PlatformViewLinkState extends State<PlatformViewLink> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handlePlatformFocusChanged(bool isFocused){
|
void _handlePlatformFocusChanged(bool isFocused) {
|
||||||
if (isFocused) {
|
if (isFocused) {
|
||||||
_focusNode!.requestFocus();
|
_focusNode!.requestFocus();
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ class ReorderableList extends StatefulWidget {
|
|||||||
static ReorderableListState of(BuildContext context) {
|
static ReorderableListState of(BuildContext context) {
|
||||||
assert(context != null);
|
assert(context != null);
|
||||||
final ReorderableListState? result = context.findAncestorStateOfType<ReorderableListState>();
|
final ReorderableListState? result = context.findAncestorStateOfType<ReorderableListState>();
|
||||||
assert((){
|
assert(() {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||||
ErrorSummary('ReorderableList.of() called with a context that does not contain a ReorderableList.'),
|
ErrorSummary('ReorderableList.of() called with a context that does not contain a ReorderableList.'),
|
||||||
@ -450,7 +450,7 @@ class SliverReorderableList extends StatefulWidget {
|
|||||||
static SliverReorderableListState of(BuildContext context) {
|
static SliverReorderableListState of(BuildContext context) {
|
||||||
assert(context != null);
|
assert(context != null);
|
||||||
final SliverReorderableListState? result = context.findAncestorStateOfType<SliverReorderableListState>();
|
final SliverReorderableListState? result = context.findAncestorStateOfType<SliverReorderableListState>();
|
||||||
assert((){
|
assert(() {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||||
ErrorSummary(
|
ErrorSummary(
|
||||||
|
@ -197,7 +197,7 @@ Widget _chipWithOptionalDeleteButton({
|
|||||||
required bool deletable,
|
required bool deletable,
|
||||||
TextDirection textDirection = TextDirection.ltr,
|
TextDirection textDirection = TextDirection.ltr,
|
||||||
bool hasDeleteButtonTooltip = true,
|
bool hasDeleteButtonTooltip = true,
|
||||||
}){
|
}) {
|
||||||
return _wrapForChip(
|
return _wrapForChip(
|
||||||
textDirection: textDirection,
|
textDirection: textDirection,
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
|
@ -400,7 +400,7 @@ void main() {
|
|||||||
testWidgets('DropdownButtonFormField - disabledHint displays when the items list is empty, when items is null', (WidgetTester tester) async {
|
testWidgets('DropdownButtonFormField - disabledHint displays when the items list is empty, when items is null', (WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items }){
|
Widget build({ List<String>? items }) {
|
||||||
return buildFormFrame(
|
return buildFormFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
@ -426,7 +426,7 @@ void main() {
|
|||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items }){
|
Widget build({ List<String>? items }) {
|
||||||
return buildFormFrame(
|
return buildFormFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
@ -448,7 +448,7 @@ void main() {
|
|||||||
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
|
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items }){
|
Widget build({ List<String>? items }) {
|
||||||
return buildFormFrame(
|
return buildFormFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
@ -468,7 +468,7 @@ void main() {
|
|||||||
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
|
testWidgets('DropdownButtonFormField - disabledHint is null by default', (WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items }){
|
Widget build({ List<String>? items }) {
|
||||||
return buildFormFrame(
|
return buildFormFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
@ -488,7 +488,7 @@ void main() {
|
|||||||
testWidgets('DropdownButtonFormField - disabledHint displays when onChanged is null', (WidgetTester tester) async {
|
testWidgets('DropdownButtonFormField - disabledHint displays when onChanged is null', (WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items, ValueChanged<String?>? onChanged }){
|
Widget build({ List<String>? items, ValueChanged<String?>? onChanged }) {
|
||||||
return buildFormFrame(
|
return buildFormFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
@ -506,7 +506,7 @@ void main() {
|
|||||||
testWidgets('DropdownButtonFormField - disabled hint should be of same size as enabled hint', (WidgetTester tester) async {
|
testWidgets('DropdownButtonFormField - disabled hint should be of same size as enabled hint', (WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items}){
|
Widget build({ List<String>? items}) {
|
||||||
return buildFormFrame(
|
return buildFormFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
|
@ -1557,7 +1557,7 @@ void main() {
|
|||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items }){
|
Widget build({ List<String>? items }) {
|
||||||
return buildFrame(
|
return buildFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
@ -1579,7 +1579,7 @@ void main() {
|
|||||||
testWidgets('DropdownButton disabledHint is null by default', (WidgetTester tester) async {
|
testWidgets('DropdownButton disabledHint is null by default', (WidgetTester tester) async {
|
||||||
final Key buttonKey = UniqueKey();
|
final Key buttonKey = UniqueKey();
|
||||||
|
|
||||||
Widget build({ List<String>? items }){
|
Widget build({ List<String>? items }) {
|
||||||
return buildFrame(
|
return buildFrame(
|
||||||
items: items,
|
items: items,
|
||||||
buttonKey: buttonKey,
|
buttonKey: buttonKey,
|
||||||
|
@ -1417,7 +1417,7 @@ void main() {
|
|||||||
child: ListTile(
|
child: ListTile(
|
||||||
key: tileKey,
|
key: tileKey,
|
||||||
onTap: enabled ? () {
|
onTap: enabled ? () {
|
||||||
setState((){
|
setState(() {
|
||||||
tapped = true;
|
tapped = true;
|
||||||
});
|
});
|
||||||
} : null,
|
} : null,
|
||||||
|
@ -121,7 +121,7 @@ void main() {
|
|||||||
maxLength: TextField.noMaxLength,
|
maxLength: TextField.noMaxLength,
|
||||||
);
|
);
|
||||||
asserted = false;
|
asserted = false;
|
||||||
} catch (e){
|
} catch (e) {
|
||||||
asserted = true;
|
asserted = true;
|
||||||
}
|
}
|
||||||
expect(asserted, false);
|
expect(asserted, false);
|
||||||
|
@ -835,7 +835,7 @@ void main() {
|
|||||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/56308
|
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/56308
|
||||||
|
|
||||||
group('TextPainter line-height', () {
|
group('TextPainter line-height', () {
|
||||||
test('half-leading', (){
|
test('half-leading', () {
|
||||||
const TextStyle style = TextStyle(
|
const TextStyle style = TextStyle(
|
||||||
height: 20,
|
height: 20,
|
||||||
fontSize: 1,
|
fontSize: 1,
|
||||||
@ -858,7 +858,7 @@ void main() {
|
|||||||
expect(insets.top, (20 - 1) / 2);
|
expect(insets.top, (20 - 1) / 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('half-leading with small height', (){
|
test('half-leading with small height', () {
|
||||||
const TextStyle style = TextStyle(
|
const TextStyle style = TextStyle(
|
||||||
height: 0.1,
|
height: 0.1,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
@ -882,7 +882,7 @@ void main() {
|
|||||||
expect(insets.top, (1 - 10) / 2);
|
expect(insets.top, (1 - 10) / 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('half-leading with leading trim', (){
|
test('half-leading with leading trim', () {
|
||||||
const TextStyle style = TextStyle(
|
const TextStyle style = TextStyle(
|
||||||
height: 0.1,
|
height: 0.1,
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
@ -908,7 +908,7 @@ void main() {
|
|||||||
expect(glyphBox.topLeft, Offset.zero);
|
expect(glyphBox.topLeft, Offset.zero);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('TextLeadingDistribution falls back to paragraph style', (){
|
test('TextLeadingDistribution falls back to paragraph style', () {
|
||||||
const TextStyle style = TextStyle(height: 20, fontSize: 1);
|
const TextStyle style = TextStyle(height: 20, fontSize: 1);
|
||||||
final TextPainter painter = TextPainter()
|
final TextPainter painter = TextPainter()
|
||||||
..textDirection = TextDirection.ltr
|
..textDirection = TextDirection.ltr
|
||||||
@ -928,7 +928,7 @@ void main() {
|
|||||||
expect(insets.top, (20 - 1) / 2);
|
expect(insets.top, (20 - 1) / 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('TextLeadingDistribution does nothing if height multiplier is null', (){
|
test('TextLeadingDistribution does nothing if height multiplier is null', () {
|
||||||
const TextStyle style = TextStyle(fontSize: 1);
|
const TextStyle style = TextStyle(fontSize: 1);
|
||||||
final TextPainter painter = TextPainter()
|
final TextPainter painter = TextPainter()
|
||||||
..textDirection = TextDirection.ltr
|
..textDirection = TextDirection.ltr
|
||||||
|
@ -40,7 +40,7 @@ void main() {
|
|||||||
expect(platformViewRenderBox.size, const Size(100, 100));
|
expect(platformViewRenderBox.size, const Size(100, 100));
|
||||||
});
|
});
|
||||||
|
|
||||||
test('send semantics update if id is changed', (){
|
test('send semantics update if id is changed', () {
|
||||||
final RenderConstrainedBox tree = RenderConstrainedBox(
|
final RenderConstrainedBox tree = RenderConstrainedBox(
|
||||||
additionalConstraints: const BoxConstraints.tightFor(height: 20.0, width: 20.0),
|
additionalConstraints: const BoxConstraints.tightFor(height: 20.0, width: 20.0),
|
||||||
child: platformViewRenderBox,
|
child: platformViewRenderBox,
|
||||||
|
@ -1084,7 +1084,7 @@ void main() {
|
|||||||
expect(tabController.index, 0);
|
expect(tabController.index, 0);
|
||||||
|
|
||||||
// switch tabs 0 -> 1
|
// switch tabs 0 -> 1
|
||||||
setState((){
|
setState(() {
|
||||||
tabController.index = 1;
|
tabController.index = 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1093,7 +1093,7 @@ void main() {
|
|||||||
expect(tabController.index, 1);
|
expect(tabController.index, 1);
|
||||||
|
|
||||||
// rebuild TabBarView that only have the 1st page with GlobalKey 'key1'
|
// rebuild TabBarView that only have the 1st page with GlobalKey 'key1'
|
||||||
setState((){
|
setState(() {
|
||||||
tabBarViewCnt = 1;
|
tabBarViewCnt = 1;
|
||||||
tabController = TabController(length: tabBarViewCnt, vsync: const TestVSync());
|
tabController = TabController(length: tabBarViewCnt, vsync: const TestVSync());
|
||||||
});
|
});
|
||||||
|
@ -635,15 +635,15 @@ void main() {
|
|||||||
body: Center(
|
body: Center(
|
||||||
child: InteractiveViewer(
|
child: InteractiveViewer(
|
||||||
transformationController: transformationController,
|
transformationController: transformationController,
|
||||||
onInteractionStart: (ScaleStartDetails details){
|
onInteractionStart: (ScaleStartDetails details) {
|
||||||
calledStart = true;
|
calledStart = true;
|
||||||
},
|
},
|
||||||
onInteractionUpdate: (ScaleUpdateDetails details){
|
onInteractionUpdate: (ScaleUpdateDetails details) {
|
||||||
scaleChange = details.scale;
|
scaleChange = details.scale;
|
||||||
focalPoint = details.focalPoint;
|
focalPoint = details.focalPoint;
|
||||||
localFocalPoint = details.localFocalPoint;
|
localFocalPoint = details.localFocalPoint;
|
||||||
},
|
},
|
||||||
onInteractionEnd: (ScaleEndDetails details){
|
onInteractionEnd: (ScaleEndDetails details) {
|
||||||
currentVelocity = details.velocity;
|
currentVelocity = details.velocity;
|
||||||
},
|
},
|
||||||
child: const SizedBox(width: 200.0, height: 200.0),
|
child: const SizedBox(width: 200.0, height: 200.0),
|
||||||
|
@ -780,7 +780,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
'/A/B': (BuildContext context) => OnTapPage(
|
'/A/B': (BuildContext context) => OnTapPage(
|
||||||
id: 'B',
|
id: 'B',
|
||||||
onTap: (){
|
onTap: () {
|
||||||
Navigator.of(context).popUntil((Route<dynamic> route) => route.isFirst);
|
Navigator.of(context).popUntil((Route<dynamic> route) => route.isFirst);
|
||||||
Navigator.of(context).pushReplacementNamed('/C');
|
Navigator.of(context).pushReplacementNamed('/C');
|
||||||
},
|
},
|
||||||
@ -847,7 +847,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
'/A/B': (BuildContext context) => OnTapPage(
|
'/A/B': (BuildContext context) => OnTapPage(
|
||||||
id: 'B',
|
id: 'B',
|
||||||
onTap: (){
|
onTap: () {
|
||||||
// Pops all routes with bad predicate.
|
// Pops all routes with bad predicate.
|
||||||
Navigator.of(context).popUntil((Route<dynamic> route) => false);
|
Navigator.of(context).popUntil((Route<dynamic> route) => false);
|
||||||
},
|
},
|
||||||
@ -2543,7 +2543,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
group('Page api', (){
|
group('Page api', () {
|
||||||
Widget buildNavigator({
|
Widget buildNavigator({
|
||||||
required List<Page<dynamic>> pages,
|
required List<Page<dynamic>> pages,
|
||||||
required PopPageCallback onPopPage,
|
required PopPageCallback onPopPage,
|
||||||
@ -2650,7 +2650,7 @@ void main() {
|
|||||||
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
||||||
'/' : (BuildContext context) => OnTapPage(
|
'/' : (BuildContext context) => OnTapPage(
|
||||||
id: action,
|
id: action,
|
||||||
onTap: (){
|
onTap: () {
|
||||||
if (action == 'push') {
|
if (action == 'push') {
|
||||||
Navigator.of(context).push(myPage.createRoute(context));
|
Navigator.of(context).push(myPage.createRoute(context));
|
||||||
} else if (action == 'pushReplacement') {
|
} else if (action == 'pushReplacement') {
|
||||||
|
@ -1080,7 +1080,7 @@ testWidgets('ChildBackButtonDispatcher take priority recursively', (WidgetTester
|
|||||||
));
|
));
|
||||||
|
|
||||||
// Only update BackButtonListener widget.
|
// Only update BackButtonListener widget.
|
||||||
setState((){
|
setState(() {
|
||||||
location = 'second callback';
|
location = 'second callback';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ void main() {
|
|||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:2),
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:2),
|
||||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
itemCount: focusNodes.length,
|
itemCount: focusNodes.length,
|
||||||
itemBuilder: (BuildContext context, int index){
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 50,
|
height: 50,
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
@ -590,7 +590,7 @@ void main() {
|
|||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:2),
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount:2),
|
||||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.manual,
|
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.manual,
|
||||||
itemCount: focusNodes.length,
|
itemCount: focusNodes.length,
|
||||||
itemBuilder: (BuildContext context, int index){
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 50,
|
height: 50,
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
|
@ -4648,7 +4648,7 @@ void main() {
|
|||||||
MaterialApp(
|
MaterialApp(
|
||||||
home: SelectableText(
|
home: SelectableText(
|
||||||
' blah blah',
|
' blah blah',
|
||||||
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause){
|
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause) {
|
||||||
selection = newSelection;
|
selection = newSelection;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -4694,7 +4694,7 @@ void main() {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
' blah blah',
|
' blah blah',
|
||||||
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause){
|
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause) {
|
||||||
selection = newSelection;
|
selection = newSelection;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -4747,7 +4747,7 @@ void main() {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
' blah blah \n blah',
|
' blah blah \n blah',
|
||||||
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause){
|
onSelectionChanged: (TextSelection newSelection, SelectionChangedCause? cause) {
|
||||||
selection = newSelection;
|
selection = newSelection;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -23,7 +23,7 @@ void main() {
|
|||||||
PointerHoverEvent? hoverEvent;
|
PointerHoverEvent? hoverEvent;
|
||||||
await tester.pumpWidget(MaterialApp(home: MouseRegion(
|
await tester.pumpWidget(MaterialApp(home: MouseRegion(
|
||||||
child: const Text('Test'),
|
child: const Text('Test'),
|
||||||
onHover: (PointerHoverEvent event){
|
onHover: (PointerHoverEvent event) {
|
||||||
hoverEvent = event;
|
hoverEvent = event;
|
||||||
},
|
},
|
||||||
)));
|
)));
|
||||||
|
@ -706,11 +706,11 @@ void main() {
|
|||||||
int numberOfVariationsRun = 0;
|
int numberOfVariationsRun = 0;
|
||||||
TargetPlatform? origTargetPlatform;
|
TargetPlatform? origTargetPlatform;
|
||||||
|
|
||||||
setUpAll((){
|
setUpAll(() {
|
||||||
origTargetPlatform = debugDefaultTargetPlatformOverride;
|
origTargetPlatform = debugDefaultTargetPlatformOverride;
|
||||||
});
|
});
|
||||||
|
|
||||||
tearDownAll((){
|
tearDownAll(() {
|
||||||
expect(debugDefaultTargetPlatformOverride, equals(origTargetPlatform));
|
expect(debugDefaultTargetPlatformOverride, equals(origTargetPlatform));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1106,7 +1106,7 @@ class ArtifactUpdater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@visibleForTesting
|
@visibleForTesting
|
||||||
String flattenNameSubdirs(Uri url, FileSystem fileSystem){
|
String flattenNameSubdirs(Uri url, FileSystem fileSystem) {
|
||||||
final List<String> pieces = <String>[url.host, ...url.pathSegments];
|
final List<String> pieces = <String>[url.host, ...url.pathSegments];
|
||||||
final Iterable<String> convertedPieces = pieces.map<String>(_flattenNameNoSubdirs);
|
final Iterable<String> convertedPieces = pieces.map<String>(_flattenNameNoSubdirs);
|
||||||
return fileSystem.path.joinAll(convertedPieces);
|
return fileSystem.path.joinAll(convertedPieces);
|
||||||
|
@ -96,7 +96,7 @@ class ChannelCommand extends FlutterCommand {
|
|||||||
// only print non-missing channels
|
// only print non-missing channels
|
||||||
if (availableChannels[i]) {
|
if (availableChannels[i]) {
|
||||||
String currentIndicator = ' ';
|
String currentIndicator = ' ';
|
||||||
if (officialChannels[i] == currentChannel){
|
if (officialChannels[i] == currentChannel) {
|
||||||
currentIndicator = '*';
|
currentIndicator = '*';
|
||||||
}
|
}
|
||||||
globals.printStatus('$currentIndicator ${officialChannels[i]}');
|
globals.printStatus('$currentIndicator ${officialChannels[i]}');
|
||||||
|
@ -308,7 +308,7 @@ class CreateCommand extends CreateBase {
|
|||||||
_printPluginDirectoryLocationMessage(relativePluginPath, projectName, platformsString);
|
_printPluginDirectoryLocationMessage(relativePluginPath, projectName, platformsString);
|
||||||
if (!creatingNewProject && requestedPlatforms.isNotEmpty) {
|
if (!creatingNewProject && requestedPlatforms.isNotEmpty) {
|
||||||
_printPluginUpdatePubspecMessage(relativePluginPath, platformsString);
|
_printPluginUpdatePubspecMessage(relativePluginPath, platformsString);
|
||||||
} else if (_getSupportedPlatformsInPlugin(projectDir).isEmpty){
|
} else if (_getSupportedPlatformsInPlugin(projectDir).isEmpty) {
|
||||||
_printNoPluginMessage();
|
_printNoPluginMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ abstract class DeviceManager {
|
|||||||
.where((Device device) => device.ephemeral == true)
|
.where((Device device) => device.ephemeral == true)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (ephemeralDevices.length == 1){
|
if (ephemeralDevices.length == 1) {
|
||||||
devices = ephemeralDevices;
|
devices = ephemeralDevices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ Map<String, dynamic> getDesiredCapabilities(Browser browser, bool headless, [Str
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Converts [browserName] string to [Browser]
|
/// Converts [browserName] string to [Browser]
|
||||||
Browser _browserNameToEnum(String browserName){
|
Browser _browserNameToEnum(String browserName) {
|
||||||
switch (browserName) {
|
switch (browserName) {
|
||||||
case 'android-chrome': return Browser.androidChrome;
|
case 'android-chrome': return Browser.androidChrome;
|
||||||
case 'chrome': return Browser.chrome;
|
case 'chrome': return Browser.chrome;
|
||||||
|
@ -834,7 +834,7 @@ dependencies:
|
|||||||
const String newPluginName = 'flutterEngine.getPlugins().add(new plugin1.UseNewEmbedding());';
|
const String newPluginName = 'flutterEngine.getPlugins().add(new plugin1.UseNewEmbedding());';
|
||||||
const String oldPluginName = 'abcplugin1.UseOldEmbedding.registerWith(shimPluginRegistry.registrarFor("abcplugin1.UseOldEmbedding"));';
|
const String oldPluginName = 'abcplugin1.UseOldEmbedding.registerWith(shimPluginRegistry.registrarFor("abcplugin1.UseOldEmbedding"));';
|
||||||
final String content = registrant.readAsStringSync();
|
final String content = registrant.readAsStringSync();
|
||||||
for(final String plugin in <String>[newPluginName,oldPluginName]){
|
for(final String plugin in <String>[newPluginName,oldPluginName]) {
|
||||||
expect(content, contains(plugin));
|
expect(content, contains(plugin));
|
||||||
expect(content.split(plugin).first.trim().endsWith('try {'), isTrue);
|
expect(content.split(plugin).first.trim().endsWith('try {'), isTrue);
|
||||||
expect(content.split(plugin).last.trim().startsWith('} catch(Exception e) {'), isTrue);
|
expect(content.split(plugin).last.trim().startsWith('} catch(Exception e) {'), isTrue);
|
||||||
|
@ -277,7 +277,7 @@ void main() {
|
|||||||
expectExists(pluginRegistrantClasses.childFile('GeneratedPluginRegistrant.m'));
|
expectExists(pluginRegistrantClasses.childFile('GeneratedPluginRegistrant.m'));
|
||||||
});
|
});
|
||||||
|
|
||||||
testUsingContext('Version.json info is correct', (){
|
testUsingContext('Version.json info is correct', () {
|
||||||
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
final MemoryFileSystem fileSystem = MemoryFileSystem.test();
|
||||||
final FlutterManifest manifest = FlutterManifest.createFromString('''
|
final FlutterManifest manifest = FlutterManifest.createFromString('''
|
||||||
name: test
|
name: test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user