2020-05-13 18:26:15 +00:00
|
|
|
import 'dart:ui';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:cake_wallet/src/screens/base_page.dart';
|
2020-05-18 17:23:33 +00:00
|
|
|
import 'package:cake_wallet/src/screens/exchange/widgets/present_provider_picker.dart';
|
|
|
|
import 'package:cake_wallet/src/screens/exchange/widgets/base_exchange_widget.dart';
|
|
|
|
import 'package:cake_wallet/generated/i18n.dart';
|
2020-07-31 15:29:21 +00:00
|
|
|
import 'package:cake_wallet/view_model/exchange/exchange_view_model.dart';
|
2020-05-13 18:26:15 +00:00
|
|
|
|
|
|
|
class ExchangeTemplatePage extends BasePage {
|
2020-07-31 15:29:21 +00:00
|
|
|
ExchangeTemplatePage(this.exchangeViewModel);
|
2020-05-13 18:26:15 +00:00
|
|
|
|
2020-07-31 15:29:21 +00:00
|
|
|
final ExchangeViewModel exchangeViewModel;
|
2020-05-29 15:10:11 +00:00
|
|
|
|
|
|
|
@override
|
2020-07-31 15:29:21 +00:00
|
|
|
String get title => S.current.exchange_new_template;
|
2020-05-13 18:26:15 +00:00
|
|
|
|
|
|
|
@override
|
2020-08-21 20:26:23 +00:00
|
|
|
Color get titleColor => Colors.white;
|
2020-05-13 18:26:15 +00:00
|
|
|
|
|
|
|
@override
|
2020-08-21 20:26:23 +00:00
|
|
|
Color get backgroundLightColor => Colors.transparent;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Color get backgroundDarkColor => Colors.transparent;
|
2020-05-13 18:26:15 +00:00
|
|
|
|
|
|
|
@override
|
2020-07-31 15:29:21 +00:00
|
|
|
Widget trailing(BuildContext context) =>
|
|
|
|
PresentProviderPicker(exchangeViewModel: exchangeViewModel);
|
2020-05-14 17:29:10 +00:00
|
|
|
|
2020-05-13 18:26:15 +00:00
|
|
|
@override
|
2020-07-31 15:29:21 +00:00
|
|
|
Widget body(BuildContext context) =>
|
2020-08-21 20:26:23 +00:00
|
|
|
BaseExchangeWidget(
|
|
|
|
exchangeViewModel: exchangeViewModel,
|
|
|
|
leading: leading(context),
|
|
|
|
middle: middle(context),
|
|
|
|
trailing: trailing(context),
|
|
|
|
isTemplate: true
|
|
|
|
);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
resizeToAvoidBottomPadding: resizeToAvoidBottomPadding,
|
|
|
|
body: Container(
|
|
|
|
color: Theme.of(context).backgroundColor,
|
|
|
|
child: body(context)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
2020-05-13 18:26:15 +00:00
|
|
|
}
|