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
d622e5de
Unverified
Commit
d622e5de
authored
Dec 22, 2020
by
Darren Austin
Committed by
GitHub
Dec 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrated some cupertino doc comments to null safety. (#72766)
parent
620a8284
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
27 deletions
+13
-27
app.dart
packages/flutter/lib/src/cupertino/app.dart
+2
-5
context_menu.dart
packages/flutter/lib/src/cupertino/context_menu.dart
+1
-1
search_field.dart
packages/flutter/lib/src/cupertino/search_field.dart
+1
-4
slider.dart
packages/flutter/lib/src/cupertino/slider.dart
+0
-1
sliding_segmented_control.dart
.../flutter/lib/src/cupertino/sliding_segmented_control.dart
+2
-5
switch.dart
packages/flutter/lib/src/cupertino/switch.dart
+1
-2
text_form_field_row.dart
packages/flutter/lib/src/cupertino/text_form_field_row.dart
+6
-9
No files found.
packages/flutter/lib/src/cupertino/app.dart
View file @
d622e5de
...
...
@@ -13,9 +13,6 @@ import 'localizations.dart';
import
'route.dart'
;
import
'theme.dart'
;
// Examples can assume:
// // @dart = 2.9
/// An application that uses Cupertino design.
///
/// A convenience widget that wraps a number of widgets that are commonly
...
...
@@ -277,7 +274,7 @@ class CupertinoApp extends StatefulWidget {
/// LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(),
/// },
/// color: const Color(0xFFFF0000),
/// builder: (BuildContext context, Widget child) {
/// builder: (BuildContext context, Widget
?
child) {
/// return const Placeholder();
/// },
/// );
...
...
@@ -310,7 +307,7 @@ class CupertinoApp extends StatefulWidget {
/// ),
/// },
/// color: const Color(0xFFFF0000),
/// builder: (BuildContext context, Widget child) {
/// builder: (BuildContext context, Widget
?
child) {
/// return const Placeholder();
/// },
/// );
...
...
packages/flutter/lib/src/cupertino/context_menu.dart
View file @
d622e5de
...
...
@@ -75,7 +75,7 @@ enum _ContextMenuLocation {
/// child's corners and allowing its aspect ratio to expand, similar to the
/// Photos app on iOS.
///
/// {@tool dartpad --template=stateless_widget_material
_no_null_safety
}
/// {@tool dartpad --template=stateless_widget_material}
///
/// This sample shows a very simple CupertinoContextMenu for an empty red
/// 100x100 Container. Simply long press on it to open.
...
...
packages/flutter/lib/src/cupertino/search_field.dart
View file @
d622e5de
...
...
@@ -12,9 +12,6 @@ import 'icons.dart';
import
'localizations.dart'
;
import
'text_field.dart'
;
// Examples can assume:
// // @dart = 2.9
/// A [CupertinoTextField] that mimics the look and behavior of UIKit's
/// `UISearchTextField`.
///
...
...
@@ -35,7 +32,7 @@ import 'text_field.dart';
/// }
///
/// class _MyPrefilledSearchState extends State<MyPrefilledSearch> {
/// TextEditingController _textController;
///
late
TextEditingController _textController;
///
/// @override
/// void initState() {
...
...
packages/flutter/lib/src/cupertino/slider.dart
View file @
d622e5de
...
...
@@ -14,7 +14,6 @@ import 'theme.dart';
import
'thumb_painter.dart'
;
// Examples can assume:
// // @dart = 2.9
// int _cupertinoSliderValue = 1;
// void setState(VoidCallback fn) { }
...
...
packages/flutter/lib/src/cupertino/sliding_segmented_control.dart
View file @
d622e5de
...
...
@@ -12,9 +12,6 @@ import 'package:flutter/widgets.dart';
import
'colors.dart'
;
// Examples can assume:
// // @dart = 2.9
// Extracted from https://developer.apple.com/design/resources/.
// Minimum padding from edges of the segmented control to edges of
...
...
@@ -197,14 +194,14 @@ class CupertinoSlidingSegmentedControl<T> extends StatefulWidget {
/// 1: Text('Child 2'),
/// };
///
/// int currentValue;
/// int
?
currentValue;
///
/// @override
/// Widget build(BuildContext context) {
/// return Container(
/// child: CupertinoSlidingSegmentedControl<int>(
/// children: children,
/// onValueChanged: (int newValue) {
/// onValueChanged: (int
?
newValue) {
/// setState(() {
/// currentValue = newValue;
/// });
...
...
packages/flutter/lib/src/cupertino/switch.dart
View file @
d622e5de
...
...
@@ -14,8 +14,7 @@ import 'colors.dart';
import
'thumb_painter.dart'
;
// Examples can assume:
// // @dart = 2.9
// bool _lights;
// bool _lights = false;
// void setState(VoidCallback fn) { }
/// An iOS-style switch.
...
...
packages/flutter/lib/src/cupertino/text_form_field_row.dart
View file @
d622e5de
...
...
@@ -11,9 +11,6 @@ import 'form_row.dart';
import
'text_field.dart'
;
import
'theme.dart'
;
// Examples can assume:
// // @dart = 2.9
/// Creates a [CupertinoFormRow] containing a [FormField] that wraps
/// a [CupertinoTextField].
///
...
...
@@ -64,18 +61,18 @@ import 'theme.dart';
/// ```dart
/// CupertinoTextFormFieldRow(
/// prefix: Text('Username'),
/// onSaved: (String value) {
/// onSaved: (String
?
value) {
/// // This optional block of code can be used to run
/// // code when the user saves the form.
/// },
/// validator: (String value) {
/// return
value.contains('@'
) ? 'Do not use the @ char.' : null;
/// validator: (String
?
value) {
/// return
(value != null && value.contains('@')
) ? 'Do not use the @ char.' : null;
/// },
/// )
/// ```
/// {@end-tool}
///
/// {@tool dartpad --template=stateful_widget_material
_no_null_safety
}
/// {@tool dartpad --template=stateful_widget_material}
/// This example shows how to move the focus to the next field when the user
/// presses the SPACE key.
///
...
...
@@ -90,7 +87,7 @@ import 'theme.dart';
/// child: Form(
/// autovalidateMode: AutovalidateMode.always,
/// onChanged: () {
/// Form.of(primaryFocus
.context)
.save();
/// Form.of(primaryFocus
!.context!)?
.save();
/// },
/// child: CupertinoFormSection.insetGrouped(
/// header: Text('SECTION 1'),
...
...
@@ -99,7 +96,7 @@ import 'theme.dart';
/// prefix: Text('Enter text'),
/// placeholder: 'Enter text',
/// validator: (value) {
/// if (value.isEmpty) {
/// if (value
== null || value
.isEmpty) {
/// return 'Please enter a value';
/// }
/// return null;
...
...
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