Skip to content

Commit

Permalink
style: apply dart fix
Browse files Browse the repository at this point in the history
  • Loading branch information
w568w committed Feb 26, 2024
1 parent 6a4c08c commit 97895c7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
5 changes: 4 additions & 1 deletion lib/page/dashboard/card_traffic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ class CardCrowdDataState extends State<CardCrowdData> {

/// Load dining hall data
Future<void> _onSelectedItemChanged(Campus? e) async {
setState(() => {_selectItem = e, _trafficInfo = null});
setState(() {
_selectItem = e;
_trafficInfo = null;
});
_trafficInfo = await DataCenterRepository.getInstance()
.getCrowdednessInfo(_personInfo, _selectItem!.index)
.catchError((e) {
Expand Down
12 changes: 6 additions & 6 deletions lib/page/opentreehole/hole_reports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@

import 'dart:async';

import 'package:dan_xi/common/constant.dart';
import 'package:dan_xi/generated/l10n.dart';
import 'package:dan_xi/model/opentreehole/audit.dart';
import 'package:dan_xi/model/opentreehole/floor.dart';
import 'package:dan_xi/model/opentreehole/hole.dart';
import 'package:dan_xi/model/opentreehole/report.dart';
import 'package:dan_xi/page/opentreehole/hole_detail.dart';
import 'package:dan_xi/page/subpage_treehole.dart';
import 'package:dan_xi/repository/opentreehole/opentreehole_repository.dart';
import 'package:dan_xi/util/browser_util.dart';
import 'package:dan_xi/util/master_detail_view.dart';
Expand All @@ -36,10 +40,6 @@ import 'package:flutter/services.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:flutter_progress_dialog/flutter_progress_dialog.dart';
import 'package:lazy_load_indexed_stack/lazy_load_indexed_stack.dart';
import 'package:dan_xi/common/constant.dart';
import 'package:dan_xi/model/opentreehole/audit.dart';
import 'package:dan_xi/model/opentreehole/floor.dart';
import 'package:dan_xi/page/subpage_treehole.dart';

/// A list page showing the reports for administrators.
class BBSReportDetail extends StatefulWidget {
Expand Down Expand Up @@ -100,8 +100,8 @@ class BBSReportDetailState extends State<BBSReportDetail> {
Expanded(
child: LazyLoadIndexedStack(index: _tabIndex, children: [
_buildReportPage(),
AuditList(true),
AuditList(false)
const AuditList(true),
const AuditList(false)
]),
),
],
Expand Down
3 changes: 2 additions & 1 deletion lib/page/platform_subpage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ abstract class PlatformSubpageState<T extends PlatformSubpage>
cupertino: (_, __) => CupertinoNavigationBarData(
title: MediaQuery(
data: MediaQueryData(
textScaleFactor: MediaQuery.textScaleFactorOf(context)),
textScaler: TextScaler.linear(
MediaQuery.textScaleFactorOf(context))),
child: TopController(child: widget.title(context))),
),
material: (_, __) => MaterialAppBarData(
Expand Down
6 changes: 4 additions & 2 deletions lib/widget/libraries/platform_app_bar_ex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,16 @@ class PlatformAppBarX extends PlatformAppBar {
//backgroundColor: Colors.white.withAlpha(254),
leading: MediaQuery(
data: MediaQueryData(
textScaleFactor: MediaQuery.textScaleFactorOf(context)),
textScaler:
TextScaler.linear(MediaQuery.textScaleFactorOf(context))),
child: CupertinoNavigationBarBackButton(
onPressed: () => Navigator.of(context).pop(),
),
),
title: MediaQuery(
data: MediaQueryData(
textScaleFactor: MediaQuery.textScaleFactorOf(context)),
textScaler:
TextScaler.linear(MediaQuery.textScaleFactorOf(context))),
child: data?.title ?? title!),
);
var trailing = trailingActions?.isEmpty ?? true
Expand Down

0 comments on commit 97895c7

Please sign in to comment.