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.
ansu_ui/example/lib/widgets/example_bottom_button.dart

70 lines
1.8 KiB

import 'package:ansu_ui/ansu_ui.dart';
import 'package:example/codeviewer/code_segments.dart';
import 'package:example/common/code_view.dart';
import 'package:flutter/material.dart';
4 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
4 years ago
import 'package:get/get.dart';
class ExampleBottomButton extends StatefulWidget {
ExampleBottomButton({Key? key}) : super(key: key);
@override
_ExampleBottomButtonState createState() => _ExampleBottomButtonState();
}
class _ExampleBottomButtonState extends State<ExampleBottomButton> {
@override
Widget build(BuildContext context) {
return ASScaffold(
title: 'ASBottomButton',
4 years ago
actions: [
IconButton(
icon: Icon(
Icons.code,
color: Colors.black54,
),
onPressed: () => Get.to(
CodeView(
text: (context) => CodeSegments.bottomButton(context),
),
),
)
],
body: Center(),
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min,
children: [
4 years ago
// BEGIN bottomButton
ASBottomButton.infinity(
title: '无渐变infinity',
onPressed: () {},
),
ASBottomButton.gradient(
title: '有渐变gradient',
onPressed: () {},
),
Row(
children: [
SizedBox(
width: 112.w,
child: ASBottomButton.shortWhite(
title: 'shortwhite',
onPressed: () {},
),
),
Expanded(
child: ASBottomButton.gradient(
title: '有渐变gradient',
onPressed: () {},
))
],
)
4 years ago
// END
],
),
);
}
}