mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-11 18:54:44 +01:00
opt.: upgrade linter & fix lint issues
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CardX extends StatelessWidget {
|
||||
const CardX(this.child, {Key? key, this.color}) : super(key: key);
|
||||
const CardX(this.child, {super.key, this.color});
|
||||
|
||||
final Widget child;
|
||||
final Color? color;
|
||||
|
||||
@@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class ChoiceChipX<T> extends StatelessWidget {
|
||||
const ChoiceChipX({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.label,
|
||||
required this.state,
|
||||
required this.value,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final String label;
|
||||
final ChoiceController<T> state;
|
||||
|
||||
@@ -6,10 +6,10 @@ class FadeIn extends StatefulWidget {
|
||||
final Duration duration;
|
||||
|
||||
const FadeIn({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.child,
|
||||
this.duration = const Duration(milliseconds: 477),
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
_MyFadeInState createState() => _MyFadeInState();
|
||||
|
||||
@@ -8,11 +8,11 @@ class OmitStartText extends StatelessWidget {
|
||||
|
||||
const OmitStartText(
|
||||
this.text, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.maxLines,
|
||||
this.style,
|
||||
this.overflow,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -184,13 +184,13 @@ class TagSwitcher extends StatelessWidget {
|
||||
final String all;
|
||||
|
||||
const TagSwitcher({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.tags,
|
||||
required this.width,
|
||||
required this.onTagChanged,
|
||||
required this.all,
|
||||
this.initTag,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -2,8 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/data/res/ui.dart';
|
||||
|
||||
class TwoLineText extends StatelessWidget {
|
||||
const TwoLineText({Key? key, required this.up, required this.down})
|
||||
: super(key: key);
|
||||
const TwoLineText({super.key, required this.up, required this.down});
|
||||
final String up;
|
||||
final String down;
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ class UrlText extends StatelessWidget {
|
||||
final TextStyle style;
|
||||
|
||||
const UrlText({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.text,
|
||||
this.replace,
|
||||
this.textAlign,
|
||||
this.style = const TextStyle(),
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
List<InlineSpan> _buildTextSpans(Color c) {
|
||||
final widgets = <InlineSpan>[];
|
||||
@@ -69,9 +69,8 @@ class UrlText extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _LinkTextSpan extends TextSpan {
|
||||
_LinkTextSpan({TextStyle? style, required String text, String? replace})
|
||||
_LinkTextSpan({super.style, required String text, String? replace})
|
||||
: super(
|
||||
style: style,
|
||||
text: replace ?? text,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
|
||||
Reference in New Issue
Block a user