Hibok
您不能選擇超過 %s 個話題 話題必須以字母或數字為開頭,可包含連接號 ('-') 且最長為 35 個字
 
 
 
 
 
 

85 行
2.4 KiB

  1. part of 'photo_main_page.dart';
  2. class _BottomWidget extends StatefulWidget {
  3. final Options options;
  4. final SelectedProvider selectedProvider;
  5. final String galleryName;
  6. final VoidCallback onTapPreview;
  7. final VoidCallback onSend;
  8. const _BottomWidget(
  9. {Key key,
  10. this.options,
  11. this.selectedProvider,
  12. this.galleryName = "",
  13. this.onTapPreview,
  14. this.onSend})
  15. : super(key: key);
  16. @override
  17. __BottomWidgetState createState() => __BottomWidgetState();
  18. }
  19. class __BottomWidgetState extends State<_BottomWidget> {
  20. Options get options => widget.options;
  21. @override
  22. Widget build(BuildContext context) {
  23. var textStyle = TextStyle(fontSize: 14.0);
  24. const textPadding = const EdgeInsets.symmetric(horizontal: 16.0);
  25. var curCount = widget.selectedProvider.selectedCount;
  26. return Container(
  27. color: Colors.white,
  28. child: SafeArea(
  29. bottom: true,
  30. top: false,
  31. child: Container(
  32. height: 52.0,
  33. child: Row(
  34. children: <Widget>[
  35. FlatButton(
  36. onPressed: widget.onTapPreview,
  37. textColor: options.textColor,
  38. splashColor: Colors.transparent,
  39. disabledTextColor: options.disableColor,
  40. child: Container(
  41. height: 44.0,
  42. alignment: Alignment.center,
  43. child: Text(
  44. I18n.of(context).Preview,
  45. style: textStyle,
  46. ),
  47. padding: textPadding,
  48. ),
  49. ),
  50. Expanded(
  51. child: Container(),
  52. ),
  53. InkWell(
  54. onTap: curCount > 0 ? widget.onSend : null,
  55. child: Container(
  56. padding: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
  57. margin: EdgeInsets.symmetric(vertical: 5, horizontal: 5),
  58. decoration: BoxDecoration(
  59. color:
  60. curCount > 0 ? Color(0xFF2D81FF) : Color(0xFFC7C7C7),
  61. borderRadius: BorderRadius.circular(8)),
  62. child: Text(
  63. "${I18n.of(context).determine}(${widget.selectedProvider.selectedCount})",
  64. style: textStyle.copyWith(color: Colors.white),
  65. ),
  66. ),
  67. )
  68. ],
  69. ),
  70. ),
  71. ),
  72. );
  73. }
  74. }