import 'dart:ui';
|
|
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/material.dart';
|
import 'package:location/ui/widget/nav.dart';
|
import 'package:location/utils/ui_constant.dart';
|
|
void main() {
|
runApp(MyApp());
|
}
|
|
class MyApp extends StatelessWidget {
|
// This widget is the root of your application.
|
@override
|
Widget build(BuildContext context) {
|
return MaterialApp(
|
title: '分享到好友',
|
theme: ThemeData(primaryColor: Color(0xFFF5F5F5)),
|
home: ShareToFriendsPage(title: ''),
|
);
|
}
|
}
|
|
class ShareToFriendsPage extends StatefulWidget {
|
ShareToFriendsPage({Key? key, required this.title}) : super(key: key);
|
|
// This widget is the home page of your application. It is stateful, meaning
|
// that it has a State object (defined below) that contains fields that affect
|
// how it looks.
|
|
// This class is the configuration for the state. It holds the values (in this
|
// case the title) provided by the parent (in this case the App widget) and
|
// used by the build method of the State. Fields in a Widget subclass are
|
// always marked "final".
|
|
final String title;
|
|
@override
|
_ShareToFriendsPageState createState() => _ShareToFriendsPageState();
|
}
|
|
class _ShareToFriendsPageState extends State<ShareToFriendsPage>
|
with SingleTickerProviderStateMixin {
|
@override
|
void initState() {
|
super.initState();
|
}
|
|
@override
|
Widget build(BuildContext context) {
|
return Scaffold(
|
backgroundColor: Color(0xFFB4E4FF),
|
body: Container(
|
child: Flex(
|
direction: Axis.vertical,
|
children: [
|
TopNavBar(title: "分享好友"),
|
Expanded(
|
child: Container(
|
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
|
child: Flex(
|
direction: Axis.vertical,
|
children: [
|
Expanded(
|
child: Center(
|
child: ClipRRect(
|
borderRadius: BorderRadius.circular(10),
|
child: Image.network(
|
"https://t7.baidu.com/it/u=4240641596,3235181048&fm=193&f=GIF"))),
|
),
|
Container(
|
alignment: Alignment.center,
|
child: InkWell(
|
onTap: () {
|
print("share");
|
},
|
child: Container(
|
height: 55,
|
decoration: BoxDecoration(
|
color: Colors.white,
|
borderRadius: BorderRadius.only(
|
topLeft: Radius.circular(10),
|
topRight: Radius.circular(10),
|
)),
|
child: Flex(
|
direction: Axis.horizontal,
|
mainAxisAlignment: MainAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
children: [
|
Image.asset(
|
"assets/images/common/icon_btn_share.png",
|
height: 16,
|
),
|
Text(
|
" 点击分享",
|
style: TextStyle(
|
color: ColorConstant.theme, fontSize: 15),
|
)
|
],
|
),
|
),
|
)),
|
],
|
),
|
))
|
],
|
)));
|
}
|
}
|