mod: 代码整理

This commit is contained in:
guozhigq
2023-07-25 23:44:09 +08:00
parent 6d9f66c420
commit 7745ea076b
74 changed files with 387 additions and 424 deletions

View File

@ -2,21 +2,21 @@ import 'package:flutter/material.dart';
import 'package:pilipala/common/constants.dart';
class ActionItem extends StatelessWidget {
Icon? icon;
Icon? selectIcon;
Function? onTap;
bool? loadingStatus;
String? text;
bool selectStatus = false;
final Icon? icon;
final Icon? selectIcon;
final Function? onTap;
final bool? loadingStatus;
final String? text;
final bool selectStatus;
ActionItem({
const ActionItem({
Key? key,
this.icon,
this.selectIcon,
this.onTap,
this.loadingStatus,
this.text,
required this.selectStatus,
this.selectStatus = false,
}) : super(key: key);
@override

View File

@ -1,22 +1,21 @@
import 'package:flutter/material.dart';
import 'package:pilipala/common/constants.dart';
class ActionRowItem extends StatelessWidget {
Icon? icon;
Icon? selectIcon;
Function? onTap;
bool? loadingStatus;
String? text;
bool selectStatus = false;
final Icon? icon;
final Icon? selectIcon;
final Function? onTap;
final bool? loadingStatus;
final String? text;
final bool selectStatus;
ActionRowItem({
const ActionRowItem({
Key? key,
this.icon,
this.selectIcon,
this.onTap,
this.loadingStatus,
this.text,
required this.selectStatus,
this.selectStatus = false,
}) : super(key: key);
@override

View File

@ -5,8 +5,8 @@ import 'package:pilipala/common/widgets/http_error.dart';
import 'package:pilipala/utils/storage.dart';
class FavPanel extends StatefulWidget {
var ctr;
FavPanel({this.ctr});
final dynamic ctr;
const FavPanel({super.key, this.ctr});
@override
State<FavPanel> createState() => _FavPanelState();
@ -112,7 +112,7 @@ class _FavPanelState extends State<FavPanel> {
}
} else {
// 骨架屏
return Text('请求中');
return const Text('请求中');
}
},
),

View File

@ -11,9 +11,9 @@ Box localCache = GStrorage.localCache;
late double sheetHeight;
class IntroDetail extends StatelessWidget {
var videoDetail;
final dynamic videoDetail;
IntroDetail({
const IntroDetail({
Key? key,
this.videoDetail,
}) : super(key: key);
@ -28,11 +28,11 @@ class IntroDetail extends StatelessWidget {
child: Column(
children: [
Container(
height: 40,
height: 35,
padding: const EdgeInsets.only(bottom: 2),
child: Center(
child: Container(
width: 40,
width: 32,
height: 3,
decoration: BoxDecoration(
color: Theme.of(context)

View File

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
class MenuRow extends StatelessWidget {
bool? loadingStatus;
MenuRow({
final bool? loadingStatus;
const MenuRow({
Key? key,
this.loadingStatus,
}) : super(key: key);

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:pilipala/models/video_detail_res.dart';
Widget seasonPanel(UgcSeason ugcSeason, cid, sheetHeight) {