Skip to content

Commit f2c2395

Browse files
committed
feat: Using a colon as a separator
Using a colon as a separator before a default value is deprecated and will not be supported in language version 3.0 and later.
1 parent 7ace360 commit f2c2395

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

lib/src/core/context.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import "dart:math";
2-
import 'dart:ui' as ui;
32
import 'package:flutter/widgets.dart';
43
import '../math/point.dart';
54
import '../math/mathutil.dart';

lib/src/node/text.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ class ZKText extends ZKNode {
9292
///
9393
////////////////////////////////////////////////////////////
9494
void setStyle(
95-
{bool inherit: false,
96-
Color color: Colors.blue,
95+
{bool inherit = false,
96+
Color color = Colors.blue,
9797
Color? backgroundColor,
98-
double fontSize: 16.0,
98+
double fontSize = 16.0,
9999
FontWeight? fontWeight,
100100
FontStyle? fontStyle,
101101
double? letterSpacing,
@@ -110,13 +110,13 @@ class ZKText extends ZKNode {
110110
String? fontFamily,
111111

112112
/// text pos style
113-
TextAlign textAlign: TextAlign.center,
114-
TextDirection textDirection: TextDirection.ltr,
115-
double textScaleFactor: 1.0,
113+
TextAlign textAlign = TextAlign.center,
114+
TextDirection textDirection = TextDirection.ltr,
115+
double textScaleFactor = 1.0,
116116
int? maxLines,
117117
String? ellipsis,
118118
StrutStyle? strutStyle,
119-
TextWidthBasis textWidthBasis: TextWidthBasis.parent}) {
119+
TextWidthBasis textWidthBasis = TextWidthBasis.parent}) {
120120
_style = _style?.merge(TextStyle(
121121
inherit: inherit,
122122
color: color,
@@ -146,13 +146,13 @@ class ZKText extends ZKNode {
146146
}
147147

148148
void setPainterStyle(
149-
{TextAlign textAlign: TextAlign.center,
150-
TextDirection textDirection: TextDirection.ltr,
151-
double textScaleFactor: 1.0,
149+
{TextAlign textAlign = TextAlign.center,
150+
TextDirection textDirection = TextDirection.ltr,
151+
double textScaleFactor = 1.0,
152152
int? maxLines,
153153
String? ellipsis,
154154
StrutStyle? strutStyle,
155-
TextWidthBasis textWidthBasis: TextWidthBasis.parent}) {
155+
TextWidthBasis textWidthBasis = TextWidthBasis.parent}) {
156156
_painter?.textAlign = textAlign;
157157
_painter?.textDirection = textDirection;
158158
_painter?.textScaleFactor = textScaleFactor;

lib/src/utils/imgloader.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ImgLoader {
1515
{String path = "",
1616
Function? onLoad,
1717
Function? onError,
18-
int timeout: 5000}) async {
18+
int timeout = 5000}) async {
1919
ImageStream stream;
2020
ImageConfiguration imgConf = ImageConfiguration.empty;
2121
Completer<ui.Image> completer = Completer<ui.Image>();

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: Zerker is a flexible and lightweight flutter canvas graphic animati
1111
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14-
version: 2.3.2
14+
version: 2.3.5
1515
homepage: https://github.com/flutterkit/zerker
1616

1717
environment:

0 commit comments

Comments
 (0)