11import 'dart:async' ;
22import 'dart:typed_data' ;
33import 'package:control_pad_plus/views/joystick_view.dart' ;
4- import 'package:flutter/cupertino.dart' ;
54import 'package:flutter/material.dart' ;
65import 'package:flutter/services.dart' ;
76import 'package:flutter_bluetooth_serial/flutter_bluetooth_serial.dart' ;
@@ -189,15 +188,15 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
189188 actions: < Widget > [
190189 IconButton (
191190 icon: const Icon (
192- CupertinoIcons .refresh_circled ,
191+ Icons .refresh_rounded ,
193192 color: Colors .white,
194193 ),
195- onPressed: isConnected ? null : () => connectToBluetooth (),
194+ onPressed: () => close (),
196195 ),
197196 IconButton (
198- icon: const Icon (CupertinoIcons .clear_circled ,
197+ icon: const Icon (Icons .close_rounded ,
199198 color: Colors .white),
200- onPressed: () => close (),
199+ onPressed: isConnected ? null : () => connectToBluetooth (),
201200 ),
202201 ],
203202 ),
@@ -227,15 +226,15 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
227226 mainAxisAlignment: MainAxisAlignment .spaceEvenly,
228227 children: < Widget > [
229228 _buildCircularButton (
230- icon: CupertinoIcons .volume_off ,
229+ icon: Icons .volume_mute ,
231230 onPressed: () => muteVolume (),
232231 ),
233232 _buildCircularButton (
234- icon: CupertinoIcons .volume_down,
233+ icon: Icons .volume_down,
235234 onPressed: () => decreaseVol (),
236235 ),
237236 _buildCircularButton (
238- icon: CupertinoIcons .volume_up,
237+ icon: Icons .volume_up,
239238 onPressed: () => increaseVol (),
240239 ),
241240 _buildCircularButton (
@@ -342,7 +341,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
342341 delta: Offset (0.0 , - 1.0 ),
343342 globalPosition: Offset (0 , 0 ))),
344343 icon: Icon (
345- CupertinoIcons .chevron_up ,
344+ Icons .keyboard_arrow_up ,
346345 color: Colors .white,
347346 ),
348347 iconSize: 20 ,
@@ -361,7 +360,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
361360 delta: Offset (0.0 , 1.0 ),
362361 globalPosition: Offset (0 , 0 ))),
363362 icon: Icon (
364- CupertinoIcons .chevron_down ,
363+ Icons .keyboard_arrow_down ,
365364 color: Colors .white,
366365 ),
367366 iconSize: 20 ,
@@ -388,7 +387,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
388387 children: < Widget > [
389388 IconButton (
390389 icon: const Icon (
391- CupertinoIcons .arrow_left_square_fill ,
390+ Icons .arrow_back ,
392391 color: Color (0xff00416a ),
393392 ),
394393 iconSize: (MediaQuery
@@ -400,7 +399,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
400399 ),
401400 IconButton (
402401 icon: const Icon (
403- CupertinoIcons .delete_left_fill ,
402+ Icons .backspace ,
404403 color: Color (0xff00416a ),
405404 ),
406405 iconSize: (MediaQuery
@@ -412,7 +411,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
412411 ),
413412 IconButton (
414413 icon: const Icon (
415- CupertinoIcons .arrow_left ,
414+ Icons .arrow_back_ios ,
416415 color: Color (0xff00416a ),
417416 ),
418417 iconSize: (MediaQuery
@@ -423,7 +422,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
423422 tooltip: 'Next' ,
424423 ),
425424 IconButton (
426- icon: const Icon (CupertinoIcons .arrow_right ,
425+ icon: const Icon (Icons .arrow_forward_ios ,
427426 color: Color (0xff00416a )),
428427 iconSize: (MediaQuery
429428 .of (context)
@@ -434,7 +433,7 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
434433 ),
435434 IconButton (
436435 icon: const Icon (
437- CupertinoIcons .escape ,
436+ Icons .close ,
438437 color: Color (0xff00416a ),
439438 ),
440439 iconSize: (MediaQuery
@@ -476,7 +475,15 @@ class _RemoteConnectionPageState extends State<RemoteConnectionPage> {
476475 onSubmitted: submit ,
477476 enabled: isConnected,
478477 ))),
479-
478+ Container (
479+ margin: const EdgeInsets .all (8.0 ),
480+ child: IconButton (
481+ icon: const Icon (Icons .send),
482+ onPressed: isConnected
483+ ? () => _sendStringToType (textEditingController.text)
484+ : null
485+ ),
486+ ),
480487 ],
481488 ),
482489 ]
0 commit comments