cake_wallet/lib/src/screens/exchange/exchange_page.dart

41 lines
1.3 KiB
Dart
Raw Normal View History

2020-01-04 19:31:52 +00:00
import 'dart:ui';
import 'package:flutter/cupertino.dart';
2020-01-04 19:31:52 +00:00
import 'package:flutter/material.dart';
import 'package:cake_wallet/palette.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/src/screens/base_page.dart';
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/src/widgets/trail_button.dart';
import 'package:cake_wallet/view_model/exchange/exchange_view_model.dart';
2020-01-04 19:31:52 +00:00
class ExchangePage extends BasePage {
ExchangePage(this.exchangeViewModel);
2020-01-04 19:31:52 +00:00
final ExchangeViewModel exchangeViewModel;
@override
String get title => S.current.exchange;
2020-01-04 19:31:52 +00:00
@override
Color get backgroundLightColor => PaletteDark.wildVioletBlue;
2020-01-04 19:31:52 +00:00
@override
Color get backgroundDarkColor => PaletteDark.wildVioletBlue;
2020-01-04 19:31:52 +00:00
@override
Widget middle(BuildContext context) =>
PresentProviderPicker(exchangeViewModel: exchangeViewModel);
2020-01-04 19:31:52 +00:00
@override
Widget trailing(BuildContext context) =>
TrailButton(
caption: S.of(context).reset,
onPressed: () => exchangeViewModel.reset()
);
2020-01-04 19:31:52 +00:00
@override
Widget body(BuildContext context) =>
BaseExchangeWidget(exchangeViewModel: exchangeViewModel);
2020-01-04 19:31:52 +00:00
}