| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import 'package:flutter/material.dart';
- import '../widget/LinearButton.dart';
- class SharePage extends StatelessWidget {
-
-
- @override
- Widget build(BuildContext context) {
- return GestureDetector(
- onTap: () {
- Navigator.of(context).pop();
- },
- child: Scaffold(
- backgroundColor: Colors.transparent,
- floatingActionButtonLocation:
- FloatingActionButtonLocation.centerDocked,
- floatingActionButton: GestureDetector(
- onTap: () {},
- child: Container(
- height: 164,
- color: Color(0xFFF2F4F5),
- child: Column(
- children: <Widget>[
- Expanded(
- flex: 1,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- ShareButton(
- '微信', 'images/share_icon_weixin.png', () {
-
- }),
- ShareButton(
- '朋友圈', 'images/share_icon_pengyouquan.png', () {
- })
- ],
- ),
- ),
- LinearButton(
- btntext: '取消',
- colorList: [Colors.white, Colors.white],
- btnHeight: 44.0,
- textColor: Colors.black,
- onTapHomeMenu: () {
- Navigator.of(context).pop();
- },
- )
- ],
- ),
- ),
- ),
- ));
- }
- }
- typedef void OnTapButton();
- class ShareButton extends StatelessWidget {
- String title;
- String url;
- OnTapButton onTapButton;
- ShareButton(this.title, this.url, this.onTapButton);
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: EdgeInsets.only(left: 12, right: 12, top: 30),
- child: Column(
- children: <Widget>[Image.asset(url), Text(title)],
- ),
- );
- }
- }
|