@@ -186,8 +186,8 @@ class _EditorPageState extends State<EditorPage> {
186186 },
187187 onAutoComplete: (String lastToken) {
188188 autoComplete = [];
189- for (var module in ModulesManager .modules){
190- autoComplete.addAll (module.onAutoComplete (language, lastToken));
189+ for (var module in ModulesManager .modules) {
190+ autoComplete.addAll (module.onAutoComplete (language, lastToken));
191191 }
192192 setState (() {
193193 autoCompleteShown = true ;
@@ -199,7 +199,7 @@ class _EditorPageState extends State<EditorPage> {
199199 autoCompleteY = offset.dy + 64 ;
200200 });
201201 },
202- onUnAutoComplete: (){
202+ onUnAutoComplete: () {
203203 setState (() {
204204 autoCompleteShown = false ;
205205 });
@@ -242,17 +242,17 @@ class _EditorPageState extends State<EditorPage> {
242242 List <Widget > result = List .generate (autoComplete.length, (index) {
243243 var item = autoComplete[index].split ("|" );
244244 var type = "undefined" , name = "name" , desc = "undefined" ;
245- if (item.isNotEmpty) {
245+ if (item.isNotEmpty) {
246246 type = item.length > 1 ? item[0 ] : "undefined" ;
247247 name = item.length > 1 ? item[1 ] : item[0 ];
248248 desc = item.length > 2 ? item[2 ] : "" ;
249249 }
250250 var color = Colors .black12;
251- switch (type){
251+ switch (type) {
252252 case "var" :
253253 color = Colors .blueAccent;
254254 break ;
255- case "func " :
255+ case "function " :
256256 color = Colors .purpleAccent;
257257 break ;
258258 case "type" :
@@ -262,43 +262,56 @@ class _EditorPageState extends State<EditorPage> {
262262 color = Colors .redAccent;
263263 break ;
264264 }
265- return InkWell (
266- //style: TextStyle(padding: MaterialStateProperty.all(EdgeInsets.zero)),
267- child: Row (
268- children: [
269- Container (
270- color: color,
271- child: Text (
272- type.characters.first,
273- textAlign: TextAlign .center,
274- ),
275- padding: const EdgeInsets .all (8.0 ),
276- margin: const EdgeInsets .only (right: 8.0 ),
277- width: 32 ,
278- ),
279- Text (
280- name,
265+ return Tooltip (
266+ verticalOffset: 200 ,
267+ message: desc,
268+ child: InkWell (
269+ //style: TextStyle(padding: MaterialStateProperty.all(EdgeInsets.zero)),
270+ child: Row (
271+ children: [
272+ Container (
273+ color: color,
274+ child: Text (
275+ type.characters.first,
276+ textAlign: TextAlign .center,
277+ ),
278+ padding: const EdgeInsets .all (8.0 ),
279+ margin: const EdgeInsets .only (right: 8.0 ),
280+ width: 32 ,
281+ ),
282+ Text (
283+ name,
284+ ),
285+ const Spacer (
286+ flex: 1 ,
287+ ),
288+ Flexible (
289+ child: Text (
290+ desc,
291+ overflow: TextOverflow .ellipsis,
292+ textAlign: TextAlign .end,
293+ ),
294+ fit: FlexFit .tight,
295+ ),
296+ const SizedBox .square (
297+ dimension: 12 ,
298+ )
299+ ],
281300 ),
282- const Spacer (flex: 1 ,),
283- Flexible (
284- child: Text (desc,overflow: TextOverflow .ellipsis,textAlign: TextAlign .end,),
285- fit: FlexFit .tight,
286- ),
287- const SizedBox .square (dimension: 12 ,)
288-
289- ],
290- ),
291- onTap: () {
292- setState (() {
293- autoCompleteShown = false ;
294- if (selectedTab == null || selectedTab! < 0 ) return ;
295- var currentTab = tabs[selectedTab! ];
296- var currentField = ((currentTab.content as SingleChildScrollView ).child as Container ).child as InnerField ;
297- var controller = currentField.codeController;
298- controller.insertStr (name);
299- });
300- },
301- );
301+ onTap: () {
302+ setState (() {
303+ autoCompleteShown = false ;
304+ if (selectedTab == null || selectedTab! < 0 ) return ;
305+ var currentTab = tabs[selectedTab! ];
306+ var currentField =
307+ ((currentTab.content as SingleChildScrollView ).child
308+ as Container )
309+ .child as InnerField ;
310+ var controller = currentField.codeController;
311+ controller.insertStr (name);
312+ });
313+ },
314+ ));
302315 });
303316
304317 return result;
@@ -311,7 +324,9 @@ class _EditorPageState extends State<EditorPage> {
311324 // Populate the file browser tree once
312325 initializeTreeView ();
313326 }
314- var tabController = TabbedViewController (tabs,);
327+ var tabController = TabbedViewController (
328+ tabs,
329+ );
315330 tabController.selectedIndex = selectedTab;
316331 final page = Stack (children: [
317332 Column (//direction: Axis.vertical,
@@ -321,7 +336,7 @@ class _EditorPageState extends State<EditorPage> {
321336 ? TabbedViewTheme (
322337 data: getTabTheme (),
323338 child: TabbedView (
324- onTabSelection: (int ? selection){
339+ onTabSelection: (int ? selection) {
325340 selectedTab = selection ?? - 1 ;
326341 },
327342 onTabClose: (tabIndex, tabData) {
@@ -341,7 +356,11 @@ class _EditorPageState extends State<EditorPage> {
341356 width: 512 ,
342357 child: ClipRRect (
343358 child: Container (
344- constraints: const BoxConstraints (minWidth: 256 ,maxWidth: 600 ,minHeight: 16 ,maxHeight: 300 ),
359+ constraints: const BoxConstraints (
360+ minWidth: 256 ,
361+ maxWidth: 600 ,
362+ minHeight: 16 ,
363+ maxHeight: 300 ),
345364 clipBehavior: Clip .none,
346365 color: ThemeManager .getThemeSchemeColor ("foreground" ),
347366 child: Material (
@@ -368,9 +387,7 @@ class _EditorPageState extends State<EditorPage> {
368387 icon: const Icon (Icons .close),
369388 tooltip: "Close Project" ,
370389 ),
371- IconButton (
372- onPressed: () => {},
373- icon: const Icon (Icons .more_horiz)),
390+ IconButton (onPressed: () => {}, icon: const Icon (Icons .more_horiz)),
374391 const SizedBox (width: 16.0 ),
375392 ],
376393 ),
0 commit comments