This commit is contained in:
2026-07-12 04:33:48 +08:00
parent f8a90ad305
commit e7ce0f7bae
151 changed files with 2765 additions and 2947 deletions

View File

@@ -18,7 +18,7 @@ import '../../widgets/mobile/MobileBottomNav.dart';
class MobileMySupport extends StatefulWidget {
final int businessId;
const MobileMySupport({Key key, this.businessId}) : super(key: key);
const MobileMySupport({Key? key, required this.businessId}) : super(key: key);
@override
State<StatefulWidget> createState() {
@@ -28,7 +28,7 @@ class MobileMySupport extends StatefulWidget {
}
class MobileMySupportState extends State<MobileMySupport> {
List<Ticket> tickets;
List<Ticket>? tickets;
int _page = 1;
int _pageCount = 1;
@@ -41,7 +41,7 @@ class MobileMySupportState extends State<MobileMySupport> {
void _onRefresh() {
_page = 1;
if (tickets != null) {
tickets.clear();
tickets?.clear();
} else {
tickets = [];
}
@@ -101,7 +101,7 @@ class MobileMySupportState extends State<MobileMySupport> {
enablePullUp: true,
header: WaterDropHeader(),
footer: CustomFooter(
builder: (BuildContext context, LoadStatus mode){
builder: (BuildContext context, LoadStatus? mode){
Widget footer;
if(mode == LoadStatus.idle) {
footer = Text(S.of(context).pull_up_to_load_more);
@@ -143,9 +143,9 @@ class MobileMySupportState extends State<MobileMySupport> {
return SizedBox.shrink();
}
return ListView.builder(
itemCount: tickets.length <= 1 ? 1 : tickets.length,
itemCount: tickets!.length <= 1 ? 1 : tickets!.length,
itemBuilder: (BuildContext context, int i) {
if (tickets.length <= 0) {
if (tickets!.length <= 0) {
return Container(
padding: EdgeInsets.all(16.0),
child: Center(
@@ -153,7 +153,7 @@ class MobileMySupportState extends State<MobileMySupport> {
),
);
} else {
Ticket ticket = tickets[i];
Ticket ticket = tickets![i];
return GestureDetector(
onTap: () {
@@ -273,7 +273,7 @@ class MobileMySupportState extends State<MobileMySupport> {
if (tickets == null) {
tickets = [];
}
tickets.addAll((value['tickets'] as List).map((e) => Ticket.fromJson(e)).toList());
tickets!.addAll((value['tickets'] as List).map((e) => Ticket.fromJson(e)).toList());
});
}
}).catchError((error) {