add misc kanji utils
This commit is contained in:
@@ -2,10 +2,10 @@ import 'dart:io';
|
||||
|
||||
import 'package:tangocard_reader/models/data_entry.dart';
|
||||
import 'package:tangocard_reader/models/router_args.dart';
|
||||
import 'package:tangocard_reader/screens/practise/flashcard.dart';
|
||||
import 'package:tangocard_reader/screens/home.dart';
|
||||
import 'package:tangocard_reader/screens/pages/tango_list.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tangocard_reader/screens/practise/practise.dart';
|
||||
|
||||
import 'screens/pages/kanji_list.dart';
|
||||
|
||||
@@ -28,28 +28,28 @@ class PageRouter {
|
||||
case '/benkyou/tango':
|
||||
final benkyouArgs = args as BenkyouArgs;
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => FlashcardView(
|
||||
cards: benkyouArgs.cards as List<YokutangoEntry>,
|
||||
index: benkyouArgs.index,
|
||||
builder: (_) => PractiseView(
|
||||
entries: benkyouArgs.cards as List<YokutangoEntry>,
|
||||
index: benkyouArgs.index ?? 0,
|
||||
isKanji: false,
|
||||
),
|
||||
);
|
||||
|
||||
case '/benkyou/kanji':
|
||||
// final benkyouArgs = args as BenkyouArgs;
|
||||
// return MaterialPageRoute(
|
||||
// builder: (_) => FlashcardView(
|
||||
// cards: benkyouArgs.cards as List<YokutangoEntry>,
|
||||
// index: benkyouArgs.index,
|
||||
// ),
|
||||
// );
|
||||
final benkyouArgs = args as BenkyouArgs;
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => PractiseView(
|
||||
entries: benkyouArgs.cards as List<KanjiEntry>,
|
||||
index: benkyouArgs.index ?? 0,
|
||||
isKanji: true,
|
||||
),
|
||||
);
|
||||
|
||||
default:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => Scaffold(
|
||||
appBar: AppBar(title: const Text('Error')),
|
||||
body: Center(
|
||||
child: ErrorWidget('No such route...')
|
||||
),
|
||||
body: Center(child: ErrorWidget('No such route...')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user