Fix typos (#121171)
* Fix typos * lowercase animated & opacity * Undo typo fix --------- Co-authored-by: Michael Goderbauer <goderbauer@google.com>
This commit is contained in:
@@ -33,7 +33,7 @@ class ActionSheetExample extends StatelessWidget {
|
||||
actions: <CupertinoActionSheetAction>[
|
||||
CupertinoActionSheetAction(
|
||||
/// This parameter indicates the action would be a default
|
||||
/// defualt behavior, turns the action's text to bold text.
|
||||
/// default behavior, turns the action's text to bold text.
|
||||
isDefaultAction: true,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
|
||||
@@ -82,7 +82,7 @@ class NextPage extends StatelessWidget {
|
||||
),
|
||||
// The middle widget is visible in both collapsed and expanded states.
|
||||
middle: const Text('Contacts Group'),
|
||||
// When the "middle" parameter is implemented, the larget title is only visible
|
||||
// When the "middle" parameter is implemented, the largest title is only visible
|
||||
// when the CupertinoSliverNavigationBar is fully expanded.
|
||||
largeTitle: const Text('Family'),
|
||||
),
|
||||
|
||||
@@ -78,7 +78,7 @@ class _MyAppState extends State<MyApp> {
|
||||
},
|
||||
// In this case this wraps a big open space in a GestureDetector in
|
||||
// order to show the context menu, but it could also wrap a single
|
||||
// wiget like an Image to give it a context menu.
|
||||
// widget like an Image to give it a context menu.
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
Container(height: 20.0),
|
||||
|
||||
@@ -45,7 +45,7 @@ class _FilterChipExampleState extends State<FilterChipExample> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Text('Choose an execise', style: textTheme.labelLarge),
|
||||
Text('Choose an exercise', style: textTheme.labelLarge),
|
||||
const SizedBox(height: 5.0),
|
||||
Wrap(
|
||||
spacing: 5.0,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// Builds an adaptive navigation widget layout. When the screen width is less than
|
||||
// 450, A [NavigationBar] will be displayed. Otherwise, a [NavigationRail] will be
|
||||
// displayed on the left side, and also a button to open the [NavigationDrawer].
|
||||
// All of these navigation widgets are built from an indentical list of data.
|
||||
// All of these navigation widgets are built from an identical list of data.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
NavigationRailLabelType labelType = NavigationRailLabelType.all;
|
||||
bool showLeading = false;
|
||||
bool showTrailing = false;
|
||||
double groupAligment = -1.0;
|
||||
double groupAlignment = -1.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -40,7 +40,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
children: <Widget>[
|
||||
NavigationRail(
|
||||
selectedIndex: _selectedIndex,
|
||||
groupAlignment: groupAligment,
|
||||
groupAlignment: groupAlignment,
|
||||
onDestinationSelected: (int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
@@ -118,7 +118,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text('Group alignment: $groupAligment'),
|
||||
Text('Group alignment: $groupAlignment'),
|
||||
const SizedBox(height: 10),
|
||||
OverflowBar(
|
||||
spacing: 10.0,
|
||||
@@ -126,7 +126,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupAligment = -1.0;
|
||||
groupAlignment = -1.0;
|
||||
});
|
||||
},
|
||||
child: const Text('Top'),
|
||||
@@ -134,7 +134,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupAligment = 0.0;
|
||||
groupAlignment = 0.0;
|
||||
});
|
||||
},
|
||||
child: const Text('Center'),
|
||||
@@ -142,7 +142,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupAligment = 1.0;
|
||||
groupAlignment = 1.0;
|
||||
});
|
||||
},
|
||||
child: const Text('Bottom'),
|
||||
|
||||
@@ -32,7 +32,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
NavigationRailLabelType labelType = NavigationRailLabelType.all;
|
||||
bool showLeading = false;
|
||||
bool showTrailing = false;
|
||||
double groupAligment = -1.0;
|
||||
double groupAlignment = -1.0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -42,7 +42,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
children: <Widget>[
|
||||
NavigationRail(
|
||||
selectedIndex: _selectedIndex,
|
||||
groupAlignment: groupAligment,
|
||||
groupAlignment: groupAlignment,
|
||||
onDestinationSelected: (int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
@@ -120,7 +120,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text('Group alignment: $groupAligment'),
|
||||
Text('Group alignment: $groupAlignment'),
|
||||
const SizedBox(height: 10),
|
||||
OverflowBar(
|
||||
spacing: 10.0,
|
||||
@@ -128,7 +128,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupAligment = -1.0;
|
||||
groupAlignment = -1.0;
|
||||
});
|
||||
},
|
||||
child: const Text('Top'),
|
||||
@@ -136,7 +136,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupAligment = 0.0;
|
||||
groupAlignment = 0.0;
|
||||
});
|
||||
},
|
||||
child: const Text('Center'),
|
||||
@@ -144,7 +144,7 @@ class _NavRailExampleState extends State<NavRailExample> {
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
groupAligment = 1.0;
|
||||
groupAlignment = 1.0;
|
||||
});
|
||||
},
|
||||
child: const Text('Bottom'),
|
||||
|
||||
@@ -93,7 +93,7 @@ class _HomeState extends State<Home> {
|
||||
// side parameter. The side can also be specified as a
|
||||
// LinearBorder parameter and if both are specified then the
|
||||
// ButtonStyle's side is used. This set up makes it possible
|
||||
// for a button theme to specify the shape and for indidividual
|
||||
// for a button theme to specify the shape and for individual
|
||||
// buttons to specify the shape border's color and width.
|
||||
SampleCard(
|
||||
title: 'LinearBorder.bottom()',
|
||||
|
||||
@@ -15,7 +15,7 @@ class MyApp extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
Offset dragGesturePositon = Offset.zero;
|
||||
Offset dragGesturePosition = Offset.zero;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -32,14 +32,14 @@ class _MyAppState extends State<MyApp> {
|
||||
GestureDetector(
|
||||
onPanUpdate: (DragUpdateDetails details) => setState(
|
||||
() {
|
||||
dragGesturePositon = details.localPosition;
|
||||
dragGesturePosition = details.localPosition;
|
||||
},
|
||||
),
|
||||
child: const FlutterLogo(size: 200),
|
||||
),
|
||||
Positioned(
|
||||
left: dragGesturePositon.dx,
|
||||
top: dragGesturePositon.dy,
|
||||
left: dragGesturePosition.dx,
|
||||
top: dragGesturePosition.dy,
|
||||
child: const RawMagnifier(
|
||||
decoration: MagnifierDecoration(
|
||||
shape: CircleBorder(
|
||||
|
||||
@@ -46,7 +46,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
body: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
const SliverToBoxAdapter(
|
||||
child: ListTile(title: Text('Press on the button to toggle the list visibilty.')),
|
||||
child: ListTile(title: Text('Press on the button to toggle the list visibility.')),
|
||||
),
|
||||
const SliverToBoxAdapter(
|
||||
child: ListTile(title: Text('Before the list...')),
|
||||
|
||||
@@ -82,7 +82,7 @@ class CustomMagnifier extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
|
||||
// Finally, align the magnifier to the bottom center. The inital anchor is
|
||||
// Finally, align the magnifier to the bottom center. The initial anchor is
|
||||
// the top left, so subtract bottom center alignment.
|
||||
magnifierPosition -= Alignment.bottomCenter.alongSize(magnifierSize);
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ void main() {
|
||||
const example.ChipApp(),
|
||||
);
|
||||
|
||||
ChoiceChip choosenChip = tester.widget(find.byType(ChoiceChip).at(1));
|
||||
expect(choosenChip.selected, true);
|
||||
ChoiceChip chosenChip = tester.widget(find.byType(ChoiceChip).at(1));
|
||||
expect(chosenChip.selected, true);
|
||||
|
||||
await tester.tap(find.byType(ChoiceChip).at(0));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
choosenChip = tester.widget(find.byType(ChoiceChip).at(0));
|
||||
expect(choosenChip.selected, true);
|
||||
chosenChip = tester.widget(find.byType(ChoiceChip).at(0));
|
||||
expect(chosenChip.selected, true);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ void main() {
|
||||
|
||||
expect(find.byType(VerticalDivider), findsOneWidget);
|
||||
|
||||
// Divider is positioned horizintally.
|
||||
// Divider is positioned horizontally.
|
||||
Offset expanded = tester.getTopRight(find.byType(Expanded).first);
|
||||
expect(expanded.dx, tester.getTopLeft(find.byType(VerticalDivider)).dx);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:flutter_api_samples/material/list_tile/list_tile.4.dart' as exam
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Can choose different title aligments from popup menu', (WidgetTester tester) async {
|
||||
testWidgets('Can choose different title alignments from popup menu', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const example.ListTileApp(),
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ Offset _textOffsetToPosition<T extends State<StatefulWidget>>(WidgetTester teste
|
||||
}
|
||||
|
||||
void main() {
|
||||
const Duration durationBetweenActons = Duration(milliseconds: 20);
|
||||
const Duration durationBetweenActions = Duration(milliseconds: 20);
|
||||
const String defaultText = 'I am a magnifier, fear me!';
|
||||
|
||||
Future<void> showMagnifier(WidgetTester tester, String characterToTapOn) async {
|
||||
@@ -51,11 +51,11 @@ void main() {
|
||||
|
||||
// Double tap 'Magnifier' word to show the selection handles.
|
||||
final TestGesture testGesture = await tester.startGesture(tapOffset);
|
||||
await tester.pump(durationBetweenActons);
|
||||
await tester.pump(durationBetweenActions);
|
||||
await testGesture.up();
|
||||
await tester.pump(durationBetweenActons);
|
||||
await tester.pump(durationBetweenActions);
|
||||
await testGesture.down(tapOffset);
|
||||
await tester.pump(durationBetweenActons);
|
||||
await tester.pump(durationBetweenActions);
|
||||
await testGesture.up();
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class WindowClassRegistrar {
|
||||
public:
|
||||
~WindowClassRegistrar() = default;
|
||||
|
||||
// Returns the singleton registar instance.
|
||||
// Returns the singleton registrar instance.
|
||||
static WindowClassRegistrar* GetInstance() {
|
||||
if (!instance_) {
|
||||
instance_ = new WindowClassRegistrar();
|
||||
|
||||
@@ -80,7 +80,7 @@ class Win32Window {
|
||||
// OS callback called by message pump. Handles the WM_NCCREATE message which
|
||||
// is passed when the non-client area is being created and enables automatic
|
||||
// non-client DPI scaling so that the non-client area automatically
|
||||
// responsponds to changes in DPI. All other messages are handled by
|
||||
// responds to changes in DPI. All other messages are handled by
|
||||
// MessageHandler.
|
||||
static LRESULT CALLBACK WndProc(HWND const window,
|
||||
UINT const message,
|
||||
|
||||
Reference in New Issue
Block a user