sample json fix
This commit is contained in:
@@ -348,6 +348,7 @@ class _DeckImportScreenState extends State<DeckImportScreen> {
|
||||
'prompt': 'Sample Question $i?',
|
||||
'answers': ['Answer A', 'Answer B', 'Answer C', 'Answer D'],
|
||||
'correctAnswerIndices': [i % 4],
|
||||
if (i == 0) 'explanation': 'Optional explanation shown when viewing question details after an attempt.',
|
||||
'isKnown': i < 5,
|
||||
};
|
||||
}),
|
||||
@@ -502,24 +503,18 @@ class _DeckImportScreenState extends State<DeckImportScreen> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Deck JSON',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 4,
|
||||
children: [
|
||||
TextButton.icon(
|
||||
onPressed: _pickJsonFile,
|
||||
icon: const Icon(Icons.folder_open),
|
||||
icon: const Icon(Icons.folder_open, size: 20),
|
||||
label: const Text('Select file'),
|
||||
),
|
||||
TextButton.icon(
|
||||
onPressed: _loadSampleDeck,
|
||||
icon: const Icon(Icons.description),
|
||||
icon: const Icon(Icons.description, size: 20),
|
||||
label: const Text('Load Sample'),
|
||||
),
|
||||
IconButton(
|
||||
@@ -529,8 +524,6 @@ class _DeckImportScreenState extends State<DeckImportScreen> {
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
TextField(
|
||||
controller: _jsonController,
|
||||
|
||||
Reference in New Issue
Block a user