|
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_2048/service/gameInit.dart';
|
|
|
import 'package:flutter_redux/flutter_redux.dart';
|
|
|
import '../store/game_state.dart';
|
|
|
+
|
|
|
// 选择模式界面
|
|
|
class ModeSelector extends StatelessWidget {
|
|
|
@override
|
|
@@ -18,21 +19,15 @@ class ModeSelector extends StatelessWidget {
|
|
|
child: Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: <Widget>[
|
|
|
- FlatButton(
|
|
|
- color: Color(0xff8f7a66),
|
|
|
- textColor: Colors.white,
|
|
|
+ TextButton(
|
|
|
onPressed: () => vm.onChange(3),
|
|
|
child: Text('3 x 3'),
|
|
|
),
|
|
|
- FlatButton(
|
|
|
- color: Color(0xff8f7a66),
|
|
|
- textColor: Colors.white,
|
|
|
+ TextButton(
|
|
|
onPressed: () => vm.onChange(4),
|
|
|
child: Text('4 x 4'),
|
|
|
),
|
|
|
- FlatButton(
|
|
|
- color: Color(0xff8f7a66),
|
|
|
- textColor: Colors.white,
|
|
|
+ TextButton(
|
|
|
onPressed: () => vm.onChange(6),
|
|
|
child: Text('6 x 6'),
|
|
|
),
|