forked from CoderTitan/mahuaPet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58d9d78
commit d29340a
Showing
17 changed files
with
1,066 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:bot_toast/bot_toast.dart'; | ||
import 'package:mahua_pet/styles/app_style.dart'; | ||
|
||
class BTToast { | ||
|
||
/// 点按位置弹窗 | ||
static void showAttached(BuildContext context, List<String> rows, void Function(String, int) callback) { | ||
final titles = rows ?? []; | ||
BotToast.showAttachedWidget( | ||
duration: null, | ||
targetContext: context, | ||
attachedBuilder: (cancelFunc) => Card( | ||
child: Container( | ||
padding: EdgeInsets.symmetric(horizontal: 8.px), | ||
height: 40.px * titles.length, | ||
child: Column( | ||
children: titles.map((e) { | ||
final index = titles.indexOf(e); | ||
return GestureDetector( | ||
child: Container( | ||
height: 40.px, | ||
width: 80.px, | ||
alignment: Alignment.center, | ||
child: Text(e, style: TextStyle(fontSize: 15.px, color: TKColor.color_333333)), | ||
decoration: BoxDecoration( | ||
border: Border( | ||
bottom: BorderSide( | ||
color: TKColor.color_e8e8e8, | ||
width: index == titles.length - 1 ? 0 : 0.5 | ||
) | ||
) | ||
), | ||
), | ||
onTap: () { | ||
cancelFunc(); | ||
callback(e, index); | ||
}, | ||
); | ||
}).toList(), | ||
), | ||
), | ||
), | ||
); | ||
|
||
// BotToast.showAttachedWidget( | ||
// duration: null, | ||
// targetContext: context, | ||
// attachedBuilder: (cancelFunc) => Card( | ||
// child: Container( | ||
// padding: EdgeInsets.symmetric(horizontal: 8.px), | ||
// height: 40.px * titles.length, | ||
// child: Column( | ||
// children: titles.map((e) { | ||
// final index = titles.indexOf(e); | ||
// return GestureDetector( | ||
// child: Container( | ||
// height: 40.px, | ||
// width: 80.px, | ||
// alignment: Alignment.center, | ||
// child: Text(e, style: TextStyle(fontSize: 15.px, color: TKColor.color_333333)), | ||
// decoration: BoxDecoration( | ||
// border: Border( | ||
// bottom: BorderSide( | ||
// color: TKColor.color_e8e8e8, | ||
// width: index == titles.length - 1 ? 0 : 0.5 | ||
// ) | ||
// ) | ||
// ), | ||
// ), | ||
// onTap: () { | ||
// cancelFunc(); | ||
// callback(e, index); | ||
// }, | ||
// ); | ||
// }).toList(), | ||
// ), | ||
// ), | ||
// ), | ||
// ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'section_a/a_animated.dart'; | ||
import 'section_a/a_section.dart'; | ||
import 'section_a/d_dialog.dart'; | ||
|
||
|
||
Map<String, WidgetBuilder> routeLists = { | ||
'SectionA': (context) => SectionA(), | ||
'Animated': (context) => AnimatWidget(), | ||
'Dialog': (context) => DialogShow(), | ||
}; |
Oops, something went wrong.