diff options
Diffstat (limited to 'lib/widgets/nlu_engine_choice.dart')
-rw-r--r-- | lib/widgets/nlu_engine_choice.dart | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/widgets/nlu_engine_choice.dart b/lib/widgets/nlu_engine_choice.dart index 32db7dd..53a4aaa 100644 --- a/lib/widgets/nlu_engine_choice.dart +++ b/lib/widgets/nlu_engine_choice.dart @@ -68,6 +68,9 @@ // } import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../models/app_state.dart'; enum NLUEngine { snips, rasa } @@ -90,7 +93,8 @@ class _NLUEngineChoiceState extends State<NLUEngineChoice> { @override void initState() { super.initState(); - _selectedEngine = NLUEngine.snips; // Initialize the selection + final appState = context.read<AppState>(); + _selectedEngine = appState.intentEngine == "snips" ? NLUEngine.snips : NLUEngine.rasa; _theme = widget.theme; } |