diff --git a/example/lib/example_button.dart b/example/lib/example_button.dart index 5c63dc7..43b82ec 100644 --- a/example/lib/example_button.dart +++ b/example/lib/example_button.dart @@ -14,16 +14,16 @@ class _ExampleButtonState extends State { return ASScaffold( title: 'Button', body: ListView( - children: [ ASButton.delete(title: '删除订单',onpressed: (){},), - ASButton.info(title: '删除订单',onpressed: (){},), - ASButton.warn(title: '删除订单',onpressed: (){},), - ASButton.opration(title: '删除订单',onpressed: (){},), + children: [ ASButton.delete(title: '删除订单',onPressed: (){},), + ASButton.info(title: '删除订单',onPressed: (){},), + ASButton.warn(title: '删除订单',onPressed: (){},), + ASButton.opration(title: '删除订单',onPressed: (){},), SizedBox(height: 12.w), - ASLongButton.solid(title: '确认',onpressed: (){},), - ASLongButton.hollow(title: '确认',onpressed: (){},), + ASLongButton.solid(title: '确认',onPressed: (){},), + ASLongButton.hollow(title: '确认',onPressed: (){},), Padding( padding: EdgeInsets.symmetric(horizontal: 100.w), - child: ASLongButton.solid(title: 'null',onpressed:(){} ), + child: ASLongButton.solid(title: 'null',onPressed:(){} ), ), ], ), diff --git a/example/lib/example_scaffold.dart b/example/lib/example_scaffold.dart index 072a3d7..ee5dd38 100644 --- a/example/lib/example_scaffold.dart +++ b/example/lib/example_scaffold.dart @@ -1,6 +1,5 @@ import 'package:ansu_ui/ansu_ui.dart'; import 'package:flutter/material.dart'; -import 'package:get/get.dart'; class ExampleScaffold extends StatefulWidget { ExampleScaffold({Key key}) : super(key: key); diff --git a/example/lib/main.dart b/example/lib/main.dart index e4431e8..051ebc0 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -42,8 +42,8 @@ class _MyHomePageState extends State { title: '安速组件', body: ListView( children: [ - ASButton.info(title:'Button',onpressed: () => Get.to(ExampleButton())), - ASButton.info(title:'Scaffold', onpressed:() => Get.to(ExampleScaffold())), + ASButton.info(title:'Button',onPressed: () => Get.to(ExampleButton())), + ASButton.info(title:'Scaffold', onPressed:() => Get.to(ExampleScaffold())), ], ), ); diff --git a/lib/buttons/as_button.dart b/lib/buttons/as_button.dart index 7b0be49..e779b37 100644 --- a/lib/buttons/as_button.dart +++ b/lib/buttons/as_button.dart @@ -30,7 +30,7 @@ class ASButton extends StatefulWidget { final EdgeInsets padding; ///点击事件 - final VoidCallback onpressed; + final VoidCallback onPressed; ///宽度 final double width; @@ -44,7 +44,7 @@ class ASButton extends StatefulWidget { this.textStyle, this.padding, @required this.title, - this.onpressed, + this.onPressed, this.width, }) : super(key: key); @@ -54,7 +54,7 @@ class ASButton extends StatefulWidget { this.padding, this.radius, this.bgcolor, - this.onpressed, + this.onPressed, @required this.title, this.width}) : outline = true, @@ -69,7 +69,7 @@ class ASButton extends StatefulWidget { this.textStyle, this.padding, @required this.title, - this.onpressed, + this.onPressed, this.width}) : outline = true, outlineColor = Color(0x73000000), @@ -83,7 +83,7 @@ class ASButton extends StatefulWidget { this.textStyle, this.padding, @required this.title, - this.onpressed, + this.onPressed, this.width}) : bgcolor = Color(0xFFFFB600), textColor = Color(0xD9FFFFFF), @@ -96,7 +96,7 @@ class ASButton extends StatefulWidget { this.textStyle, this.padding, @required this.title, - this.onpressed, + this.onPressed, this.width}) : bgcolor = Color(0xFFF2F2F2), textColor = Color(0xD9000000), @@ -113,7 +113,7 @@ class _ASButtonState extends State { return MaterialButton( minWidth: widget.width ?? 75.w, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - onPressed: widget.onpressed, + onPressed: widget.onPressed, child: widget.title is String ? Text(widget.title, style: widget.textStyle ?? diff --git a/lib/buttons/as_longbutton.dart b/lib/buttons/as_longbutton.dart index a52b8ea..465af03 100644 --- a/lib/buttons/as_longbutton.dart +++ b/lib/buttons/as_longbutton.dart @@ -29,7 +29,7 @@ class ASLongButton extends StatefulWidget { final Color outlineColor; ///点击事件 - final VoidCallback onpressed; + final VoidCallback onPressed; ///宽度 final double width; @@ -44,7 +44,7 @@ class ASLongButton extends StatefulWidget { this.padding, this.outline = false, this.outlineColor, - this.onpressed, + this.onPressed, this.width}) : super(key: key); @@ -55,7 +55,7 @@ class ASLongButton extends StatefulWidget { this.outlineColor, this.radius, @required this.title, - this.onpressed, + this.onPressed, this.width, }) : bgColor = Color(0xFFF6B72D), textColor = Color(0xFFFFFFFF), @@ -66,7 +66,7 @@ class ASLongButton extends StatefulWidget { this.radius, this.textStyle, this.padding, - this.onpressed, + this.onPressed, @required this.title, this.width}) : bgColor = Color(0xFFFFFFFF), @@ -85,7 +85,7 @@ class _ASLongButtonState extends State { minWidth: widget.width ?? 280.w, disabledColor: Color(0xFFC1BDB5), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - onPressed: widget.onpressed, + onPressed: widget.onPressed, child: widget.title is String ? Text(widget.title, style: widget.textStyle ??