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
6ad6c0f4
Unverified
Commit
6ad6c0f4
authored
Dec 23, 2020
by
Kate Lovett
Committed by
GitHub
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate some sample code (#72558)
parent
2e8faec0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
15 deletions
+8
-15
continuous_rectangle_border.dart
...flutter/lib/src/painting/continuous_rectangle_border.dart
+1
-1
gradient.dart
packages/flutter/lib/src/painting/gradient.dart
+1
-1
image_stream.dart
packages/flutter/lib/src/painting/image_stream.dart
+3
-6
text_span.dart
packages/flutter/lib/src/painting/text_span.dart
+1
-4
text_style.dart
packages/flutter/lib/src/painting/text_style.dart
+2
-3
No files found.
packages/flutter/lib/src/painting/continuous_rectangle_border.dart
View file @
6ad6c0f4
...
...
@@ -93,7 +93,7 @@ class ContinuousRectangleBorder extends OutlinedBorder {
final
double
top
=
rrect
.
top
;
final
double
bottom
=
rrect
.
bottom
;
// Radii will be clamped to the value of the shortest side
//
/ of [rrect]
to avoid strange tie-fighter shapes.
//
of rrect
to avoid strange tie-fighter shapes.
final
double
tlRadiusX
=
math
.
max
(
0.0
,
_clampToShortest
(
rrect
,
rrect
.
tlRadiusX
));
final
double
tlRadiusY
=
...
...
packages/flutter/lib/src/painting/gradient.dart
View file @
6ad6c0f4
...
...
@@ -330,7 +330,7 @@ abstract class Gradient {
/// Typically this class is used with [BoxDecoration], which does the painting.
/// To use a [LinearGradient] to paint on a canvas directly, see [createShader].
///
/// {@tool dartpad --template=stateless_widget_material
_no_null_safety
}
/// {@tool dartpad --template=stateless_widget_material}
/// This sample draws a picture that looks like vertical window shades by having
/// a [Container] display a [BoxDecoration] with a [LinearGradient].
///
...
...
packages/flutter/lib/src/painting/image_stream.dart
View file @
6ad6c0f4
...
...
@@ -9,9 +9,6 @@ import 'dart:ui' show hashValues;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/scheduler.dart'
;
// Examples can assume:
// // @dart = 2.9
/// A [dart:ui.Image] object with its corresponding scale.
///
/// ImageInfo objects are used by [ImageStream] objects to represent the
...
...
@@ -69,8 +66,8 @@ class ImageInfo {
/// [ImageInfo] reference refers to new image data or not.
///
/// ```dart
/// ImageInfo _imageInfo;
/// set imageInfo (ImageInfo value) {
/// ImageInfo
?
_imageInfo;
/// set imageInfo (ImageInfo
?
value) {
/// // If the image reference is exactly the same, do nothing.
/// if (value == _imageInfo) {
/// return;
...
...
@@ -78,7 +75,7 @@ class ImageInfo {
/// // If it is a clone of the current reference, we must dispose of it and
/// // can do so immediately. Since the underlying image has not changed,
/// // We don't have any additional work to do here.
/// if (value != null && _imageInfo != null && value.isCloneOf(_imageInfo)) {
/// if (value != null && _imageInfo != null && value.isCloneOf(_imageInfo
!
)) {
/// value.dispose();
/// return;
/// }
...
...
packages/flutter/lib/src/painting/text_span.dart
View file @
6ad6c0f4
...
...
@@ -13,9 +13,6 @@ import 'inline_span.dart';
import
'text_painter.dart'
;
import
'text_style.dart'
;
// Examples can assume:
// // @dart = 2.9
/// An immutable span of text.
///
/// A [TextSpan] object can be styled using its [style] property. The style will
...
...
@@ -128,7 +125,7 @@ class TextSpan extends InlineSpan {
/// }
///
/// class _BuzzingTextState extends State<BuzzingText> {
/// LongPressGestureRecognizer _longPressRecognizer;
///
late
LongPressGestureRecognizer _longPressRecognizer;
///
/// @override
/// void initState() {
...
...
packages/flutter/lib/src/painting/text_style.dart
View file @
6ad6c0f4
...
...
@@ -25,8 +25,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
const
double
_kDefaultFontSize
=
14.0
;
// Examples can assume:
// // @dart = 2.9
// BuildContext context;
// late BuildContext context;
/// An immutable style describing how to format and paint text.
///
...
...
@@ -205,7 +204,7 @@ const double _kDefaultFontSize = 14.0;
/// foreground: Paint()
/// ..style = PaintingStyle.stroke
/// ..strokeWidth = 6
/// ..color = Colors.blue[700],
/// ..color = Colors.blue[700]
!
,
/// ),
/// ),
/// // Solid text as fill.
...
...
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