Flutter flatter:如何添加符合苹果指南的苹果支付按钮
这是一个相当简单的问题,但我想知道如何将apple pay按钮添加到Flitter应用程序中。我是否需要按照苹果的指导方针从头开始创建按钮,或者是否需要使用模板?我记得在斯威夫特有一个现成的东西。Flutter flatter:如何添加符合苹果指南的苹果支付按钮,flutter,applepay,Flutter,Applepay,这是一个相当简单的问题,但我想知道如何将apple pay按钮添加到Flitter应用程序中。我是否需要按照苹果的指导方针从头开始创建按钮,或者是否需要使用模板?我记得在斯威夫特有一个现成的东西。 谢谢flatter没有苹果支付这样的按钮,也没有苹果图标 因此,您可以在这里做两件事-> 添加“Apple”的自定义图标 添加“苹果”图片而不是图标(我想你知道这一点) [如果您不知道如何添加图像,请告诉我] 然后你可以创建这样的按钮 访问、搜索apple并选择“apple徽标”而不是“apple
谢谢flatter没有苹果支付这样的按钮,也没有苹果图标 因此,您可以在这里做两件事->
//pubspec.yaml ->
fonts:
- family: Custom
fonts:
- assets/Custom.ttf //path of Custom.ttf in you project
//Dart file where you will add Apple pay button
import'custom_icons.dart' as CustomIcon;//custom_icons.dart is one of the downloaded file
//THIS IS THE NORMAL WAY TO CREATE A BUTTON
RaisedButton(
color: Colors.black,
onPressed: (){
//ADD THE FUNCTIONS OF THIS BUTTON HERE
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CustomIcon.Custom.apple, color: Colors.white,),
SizedBox(width: 8.0,),
Text('Apple Pay', style: TextStyle(color: Colors.white),)
],
),
),
//USE THIS FOR CUSTOMISING YOUR BUTTON
Container(
height: 30.0,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8.0)),
color: Colors.black
),
child: GestureDetector(
onTap: (){
//ADD THE FUNCTIONS OF THIS BUTTON HERE
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CustomIcon.Custom.apple, color: Colors.white,),
SizedBox(width: 8.0,),
Text('Apple Pay', style: TextStyle(color: Colors.white),)
],
),
),
),
您想创建一个带有苹果徽标和“支付”文本的按钮吗?我真的不明白什么是“苹果付费按钮”是的,我想要典型的带有苹果标志的黑色按钮和“付费按钮”