File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class _EditorPageState extends State<EditorPage> {
3838 ];
3939 double autoCompleteX = 0 ;
4040 double autoCompleteY = 0 ;
41- int selectedTab = 0 ;
41+ int ? selectedTab = null ;
4242
4343 @override
4444 void initState () {
@@ -290,8 +290,8 @@ class _EditorPageState extends State<EditorPage> {
290290 onTap: () {
291291 setState (() {
292292 autoCompleteShown = false ;
293- if (selectedTab < 0 ) return ;
294- var currentTab = tabs[selectedTab];
293+ if (selectedTab == null || selectedTab ! < 0 ) return ;
294+ var currentTab = tabs[selectedTab! ];
295295 var currentField = ((currentTab.content as SingleChildScrollView ).child as Container ).child as InnerField ;
296296 var controller = currentField.codeController;
297297 controller.insertStr (name);
You can’t perform that action at this time.
0 commit comments