43 lines
991 B
Dart
43 lines
991 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import '../constants/images.dart';
|
|
import '../constants/styles.dart';
|
|
|
|
class MyBackButton extends StatelessWidget {
|
|
const MyBackButton({
|
|
super.key,
|
|
this.onPressed,
|
|
});
|
|
|
|
final VoidCallback? onPressed;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: () {
|
|
onPressed?.call();
|
|
},
|
|
child: Container(
|
|
height: 41.h,
|
|
color: Colors.transparent,
|
|
child: Text.rich(
|
|
TextSpan(
|
|
children: [
|
|
WidgetSpan(
|
|
alignment: PlaceholderAlignment.middle,
|
|
child: Images.back,
|
|
),
|
|
const WidgetSpan(child: RSizedBox(width: 2.0)),
|
|
TextSpan(
|
|
text: '返回',
|
|
style: TextStyles.mediumWhiteShadow26_034,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|