Skip to content

Instantly share code, notes, and snippets.

@bitqiu
Created December 8, 2023 07:26
Show Gist options
  • Select an option

  • Save bitqiu/7347e3a1b3ac57cd711e2080738d51cd to your computer and use it in GitHub Desktop.

Select an option

Save bitqiu/7347e3a1b3ac57cd711e2080738d51cd to your computer and use it in GitHub Desktop.
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: PaymentPage(),
);
}
}
class PaymentPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: Colors.white,
elevation: 0,
),
body: Column(
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.network(
'https://placehold.co/100x100?description=Payment%20Service%20Logo',
width: 100,
height: 100,
),
SizedBox(height: 24),
Text(
'185****6299',
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 8),
Text(
'中国联通话费',
style: TextStyle(
fontSize: 16,
color: Colors.grey,
),
),
SizedBox(height: 24),
ElevatedButton(
onPressed: () {},
child: Text('本机号码一键登录'),
style: ElevatedButton.styleFrom(
primary: Colors.green,
minimumSize: Size(double.infinity, 48),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
),
),
SizedBox(height: 16),
OutlinedButton(
onPressed: () {},
child: Text('其他手机号码登录'),
style: OutlinedButton.styleFrom(
primary: Colors.black,
minimumSize: Size(double.infinity, 48),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
side: BorderSide(color: Colors.grey),
),
),
],
),
),
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
Text(
'其他登录方式',
style: TextStyle(
fontSize: 16,
color: Colors.grey,
),
),
SizedBox(height: 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.network(
'https://placehold.co/40x40?description=WeChat%20Logo',
width: 40,
height: 40,
),
Image.network(
'https://placehold.co/40x40?description=Apple%20Logo',
width: 40,
height: 40,
),
],
),
SizedBox(height: 24),
Text(
'登录即同意《隐私政策》和《平台服务协议》\n及《第三方登录协议》并授权本机号码登录',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12,
color: Colors.grey,
),
),
],
),
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment