Houshan-Basa/lib/ui/widgets/components/button/inventory_btn.dart

56 lines
1.8 KiB
Dart

// ignore_for_file: deprecated_member_use_from_same_package
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:hoshan/core/gen/assets.gen.dart';
import 'package:hoshan/data/model/ai/bots_model.dart';
import 'package:hoshan/ui/theme/colors.dart';
import 'package:hoshan/ui/widgets/components/dialog/bottom_sheets.dart';
import 'package:hoshan/ui/widgets/components/text/credit_cost.dart';
class InventoryBtn extends StatelessWidget {
final Bots bot;
const InventoryBtn({super.key, required this.bot});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () async {
await BottomSheetHandler(context).showInventory(bot: bot);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: AppColors.secondryColor[50]),
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Assets.icon.outline.coin.svg(),
const SizedBox(
width: 8,
),
Padding(
padding: const EdgeInsets.only(top: 4.0),
child: CreditCost(
textColor: Colors.black,
call: false,
loadingColor: Theme.of(context).colorScheme.secondary,
)),
const SizedBox(
width: 8,
),
Transform.rotate(
angle: 90 * pi / 180,
child: Assets.icon.outline.arrowRight.svg(
color: AppColors.secondryColor.defaultShade,
width: 18,
height: 18)),
],
),
),
);
}
}