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> {
38
38
];
39
39
double autoCompleteX = 0 ;
40
40
double autoCompleteY = 0 ;
41
- int selectedTab = 0 ;
41
+ int ? selectedTab = null ;
42
42
43
43
@override
44
44
void initState () {
@@ -290,8 +290,8 @@ class _EditorPageState extends State<EditorPage> {
290
290
onTap: () {
291
291
setState (() {
292
292
autoCompleteShown = false ;
293
- if (selectedTab < 0 ) return ;
294
- var currentTab = tabs[selectedTab];
293
+ if (selectedTab == null || selectedTab ! < 0 ) return ;
294
+ var currentTab = tabs[selectedTab! ];
295
295
var currentField = ((currentTab.content as SingleChildScrollView ).child as Container ).child as InnerField ;
296
296
var controller = currentField.codeController;
297
297
controller.insertStr (name);
You can’t perform that action at this time.
0 commit comments