You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.4 KiB
89 lines
2.4 KiB
import 'dart:io'; |
|
|
|
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/generated/l10n.dart'; |
|
import 'package:webview_flutter/webview_flutter.dart'; |
|
|
|
class StoreDetailsPage extends StatefulWidget { |
|
@override |
|
State<StatefulWidget> createState() { |
|
return _StoreDetailsPage(); |
|
} |
|
} |
|
|
|
class _StoreDetailsPage extends State<StoreDetailsPage> { |
|
@override |
|
void initState() { |
|
super.initState(); |
|
|
|
if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView(); |
|
} |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return Scaffold( |
|
appBar: AppBar( |
|
backgroundColor: Color(0xFFF7F7F7), |
|
elevation: 0, |
|
leading: GestureDetector( |
|
onTap: () { |
|
Navigator.of(context).pop(); |
|
}, |
|
child: Container( |
|
alignment: Alignment.centerRight, |
|
margin: EdgeInsets.only(left: 10), |
|
padding: EdgeInsets.all(6), |
|
child: Icon( |
|
Icons.arrow_back_ios, |
|
color: Colors.black, |
|
size: 24, |
|
), |
|
), |
|
), |
|
titleSpacing: 2, |
|
leadingWidth: 56, |
|
actions: [ |
|
Container( |
|
margin: EdgeInsets.only(right: 15), |
|
child: GestureDetector( |
|
onTap: () {}, |
|
child: Icon( |
|
Icons.share, |
|
size: 24, |
|
color: Colors.black, |
|
), |
|
), |
|
) |
|
], |
|
), |
|
body: Container( |
|
child: Column( |
|
children: [ |
|
Expanded( |
|
child: WebView( |
|
initialUrl: 'https://blog.csdn.net/u013491829/article/details/105153666', |
|
), |
|
flex: 1, |
|
), |
|
Container( |
|
padding: EdgeInsets.only(top: 16, bottom: 16), |
|
decoration: BoxDecoration( |
|
color: Color(0xFF32A060), |
|
borderRadius: BorderRadius.only( |
|
topLeft: Radius.circular(4), |
|
topRight: Radius.circular(4))), |
|
alignment: Alignment.center, |
|
child: Text( |
|
S.of(context).lijicanjia, |
|
style: TextStyle( |
|
fontSize: 16, |
|
color: Color(0xFFFFFFFF), |
|
fontWeight: FontWeight.bold), |
|
), |
|
), |
|
], |
|
), |
|
), |
|
); |
|
} |
|
}
|
|
|