Skip to content

Commit cdfafba

Browse files
committed
font_awesome_flutter v11 の FaIcon ウィジェットに対応
1 parent 6d70f6f commit cdfafba

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

integration_test/app_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Future<void> main() async {
9393
await waitEdaxServerResponse(tester);
9494

9595
// shortcut cheatsheet
96-
await tester.tap(find.byIcon(FontAwesomeIcons.keyboard));
96+
await tester.tap(find.byType(FaIcon).first);
9797
await tester.pumpAndSettle();
9898
expect(find.text(l10n.shortcutCheatsheet), findsOneWidget);
9999
await tester.tapAt(const Offset(1, 1));

lib/home/home.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class HomeState extends State<Home> {
192192
centerTitle: true,
193193
actions: [
194194
IconButton(
195-
icon: const Icon(FontAwesomeIcons.keyboard),
195+
icon: const FaIcon(FontAwesomeIcons.keyboard),
196196
padding: const EdgeInsets.all(12),
197197
onPressed: () async => showDialog<void>(
198198
context: context,
@@ -214,25 +214,25 @@ class HomeState extends State<Home> {
214214
}
215215

216216
Widget get _undoAllButton => IconButton(
217-
icon: const Icon(FontAwesomeIcons.anglesLeft),
217+
icon: const FaIcon(FontAwesomeIcons.anglesLeft),
218218
iconSize: _undoOrRedoIconSize,
219219
onPressed: () => context.read<BoardNotifier>().requestUndoAll(),
220220
);
221221

222222
Widget get _undoButton => IconButton(
223-
icon: const Icon(FontAwesomeIcons.angleLeft),
223+
icon: const FaIcon(FontAwesomeIcons.angleLeft),
224224
iconSize: _undoOrRedoIconSize,
225225
onPressed: () => context.read<BoardNotifier>().requestUndo(),
226226
);
227227

228228
Widget get _redoButton => IconButton(
229-
icon: const Icon(FontAwesomeIcons.angleRight),
229+
icon: const FaIcon(FontAwesomeIcons.angleRight),
230230
iconSize: _undoOrRedoIconSize,
231231
onPressed: () => context.read<BoardNotifier>().requestRedo(),
232232
);
233233

234234
Widget get _redoAllButton => IconButton(
235-
icon: const Icon(FontAwesomeIcons.anglesRight),
235+
icon: const FaIcon(FontAwesomeIcons.anglesRight),
236236
iconSize: _undoOrRedoIconSize,
237237
onPressed: () => context.read<BoardNotifier>().requestRedoAll(),
238238
);

test/menu_event_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import 'package:pedax/home/setting_dialogs/bestpath_count_availability_setting_d
88
import 'package:pedax/home/setting_dialogs/book_file_path_setting_dialog.dart';
99
import 'package:pedax/home/setting_dialogs/hint_step_by_step_setting_dialog.dart';
1010
import 'package:pedax/home/setting_dialogs/level_setting_dialog.dart';
11-
import 'package:pedax/home/setting_dialogs/n_tasks_setting_dialog.dart';
1211
import 'package:pedax/home/setting_dialogs/shortcut_cheatsheet_dialog.dart';
12+
import 'package:pedax/home/setting_dialogs/n_tasks_setting_dialog.dart';
1313
import '../test_helper/edax_server.dart';
1414
import '../test_helper/secure_bookmark_mock.dart';
1515
import '../test_helper/windows_manager_mock.dart';
@@ -54,7 +54,7 @@ Future<void> main() async {
5454
await tester.pumpWidget(const PedaxApp());
5555
await waitEdaxSetuped(tester);
5656

57-
await tester.tap(find.byIcon(FontAwesomeIcons.keyboard));
57+
await tester.tap(find.byType(FaIcon).first);
5858
await tester.pumpAndSettle();
5959
expect(find.byType(ShortcutCheatsheetDialog), findsOneWidget);
6060
await waitEdaxServerResponse(tester);

test/play_game_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,15 @@ Future<void> main() async {
108108
expectStoneNum(tester, SquareType.white, 2);
109109
expectStoneCoordinates(tester, ['d4', 'f4'], SquareType.white);
110110

111-
await tester.tap(find.byIcon(FontAwesomeIcons.angleLeft));
111+
await tester.tap(find.byType(FaIcon).at(3));
112112
await waitEdaxServerResponse(tester);
113113
await tester.pump();
114114
expectStoneNum(tester, SquareType.black, 3);
115115
expectStoneCoordinates(tester, ['d5', 'e5', 'f5'], SquareType.black);
116116
expectStoneNum(tester, SquareType.white, 3);
117117
expectStoneCoordinates(tester, ['d4', 'e4', 'f4'], SquareType.white);
118118

119-
await tester.tap(find.byIcon(FontAwesomeIcons.angleRight));
119+
await tester.tap(find.byType(FaIcon).at(4));
120120
await waitEdaxServerResponse(tester);
121121
await tester.pump();
122122
expectStoneNum(tester, SquareType.black, 5);
@@ -140,15 +140,15 @@ Future<void> main() async {
140140
expectStoneNum(tester, SquareType.white, 2);
141141
expectStoneCoordinates(tester, ['d4', 'f4'], SquareType.white);
142142

143-
await tester.tap(find.byIcon(FontAwesomeIcons.anglesLeft));
143+
await tester.tap(find.byType(FaIcon).at(2));
144144
await waitEdaxServerResponse(tester);
145145
await tester.pump(const Duration(microseconds: 300));
146146
expectStoneNum(tester, SquareType.black, 2);
147147
expectStoneCoordinates(tester, ['e4', 'd5'], SquareType.black);
148148
expectStoneNum(tester, SquareType.white, 2);
149149
expectStoneCoordinates(tester, ['d4', 'e5'], SquareType.white);
150150

151-
await tester.tap(find.byIcon(FontAwesomeIcons.anglesRight));
151+
await tester.tap(find.byType(FaIcon).at(3));
152152
await waitEdaxServerResponse(tester);
153153
await tester.pump(const Duration(microseconds: 300));
154154
expectStoneNum(tester, SquareType.black, 5);
@@ -275,15 +275,15 @@ Future<void> main() async {
275275
expectStoneNum(tester, SquareType.white, 6);
276276
expectStoneCoordinates(tester, ['e7', 'f6', 'g5', 'h4', 'h5', 'h6'], SquareType.white);
277277

278-
await tester.tap(find.byIcon(FontAwesomeIcons.angleLeft)); // skip pass internally in engine.
278+
await tester.tap(find.byType(FaIcon).at(3));
279279
await waitEdaxServerResponse(tester);
280280
await tester.pump();
281281
expectStoneNum(tester, SquareType.black, 8);
282282
expectStoneCoordinates(tester, ['d3', 'd4', 'd5', 'e4', 'e5', 'f5', 'f6', 'f7'], SquareType.black);
283283
expectStoneNum(tester, SquareType.white, 4);
284284
expectStoneCoordinates(tester, ['g5', 'h4', 'h5', 'h6'], SquareType.white);
285285

286-
await tester.tap(find.byIcon(FontAwesomeIcons.angleRight)); // skip pass internally in engine.
286+
await tester.tap(find.byType(FaIcon).at(4));
287287
await waitEdaxServerResponse(tester);
288288
await tester.pump();
289289
expectStoneNum(tester, SquareType.black, 7);

0 commit comments

Comments
 (0)