diff --git a/packages/simplex_app/lib/main.dart b/packages/simplex_app/lib/main.dart index 7f3cc91b0..0ef1a665d 100644 --- a/packages/simplex_app/lib/main.dart +++ b/packages/simplex_app/lib/main.dart @@ -39,6 +39,7 @@ class MyApp extends StatelessWidget { title: 'SimpleX Chat', theme: theme.copyWith( colorScheme: theme.colorScheme.copyWith(secondary: kPrimaryColor), + primaryColorLight: Colors.white, ), builder: (context, widget) { return ScrollConfiguration( diff --git a/packages/simplex_app/lib/views/contacts/add_contact_view.dart b/packages/simplex_app/lib/views/contacts/add_contact_view.dart index 6d73853b1..3a2ec4d83 100644 --- a/packages/simplex_app/lib/views/contacts/add_contact_view.dart +++ b/packages/simplex_app/lib/views/contacts/add_contact_view.dart @@ -1,8 +1,5 @@ -import 'dart:io'; - import 'package:flutter/material.dart'; import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:simplex_chat/views/contacts/qr_code_details_view.dart'; class AddContactView extends StatefulWidget { const AddContactView({Key? key}) : super(key: key); @@ -17,16 +14,6 @@ class _AddContactViewState extends State { QRViewController? _qrViewController; Barcode? result; - @override - void reassemble() { - super.reassemble(); - if (Platform.isAndroid) { - _qrViewController!.pauseCamera(); - } else if (Platform.isIOS) { - _qrViewController!.resumeCamera(); - } - } - // alert dialgoue void _initialWarning() { showDialog( @@ -174,7 +161,7 @@ class _AddContactViewState extends State { controller.scannedDataStream.listen((scanData) { setState(() async { result = scanData; - await controller.pauseCamera(); + await controller.stopCamera(); if (result != null) { Navigator.of(context).pop(true); } diff --git a/packages/simplex_app/lib/views/contacts/conversations.dart b/packages/simplex_app/lib/views/contacts/conversations.dart index 9f354a678..2269ddd70 100644 --- a/packages/simplex_app/lib/views/contacts/conversations.dart +++ b/packages/simplex_app/lib/views/contacts/conversations.dart @@ -117,6 +117,7 @@ class _ConversationsState extends State { ), ) : ListView( + physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, children: List.generate( _conversations.length, diff --git a/packages/simplex_app/lib/views/contacts/qr_code_details_view.dart b/packages/simplex_app/lib/views/contacts/qr_code_details_view.dart deleted file mode 100644 index 885e1e6c1..000000000 --- a/packages/simplex_app/lib/views/contacts/qr_code_details_view.dart +++ /dev/null @@ -1,64 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:qr_code_scanner/qr_code_scanner.dart'; -import 'package:simplex_chat/constants.dart'; -import 'package:simplex_chat/widgets/custom_btn.dart'; - -/// Tap in the middle of QR Code to see the flow of contact being added in the Chat View - -class QRCodeDetailsView extends StatelessWidget { - final Barcode barcode; - const QRCodeDetailsView({ - Key? key, - required this.barcode, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('QR Code Result'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const CircleAvatar( - backgroundImage: AssetImage('assets/dp.png'), - radius: 90, - ), - const SizedBox(height: 30.0), - Text( - barcode.code, - style: kMediumHeadingStyle, - textAlign: TextAlign.center, - ), - const SizedBox(height: 30.0), - CustomButton( - width: 200, - height: 40, - onPressed: () => Navigator.pop(context), - color: kPrimaryColor, - child: const Text( - 'Confirm', - style: TextStyle(color: Colors.white), - ), - ), - const SizedBox(height: 10.0), - CustomButton( - width: 200, - height: 40, - onPressed: () => Navigator.pop(context), - color: kSecondaryColor, - child: const Text( - 'Ignore', - style: TextStyle(color: Colors.white), - ), - ), - const SizedBox(height: 40.0), - const Text('Invitation was sent HH:MM') - ], - ), - ), - ); - } -} diff --git a/packages/simplex_app/lib/views/scan_invitation/scan_invitation_view.dart b/packages/simplex_app/lib/views/scan_invitation/scan_invitation_view.dart index 9363ba99c..51f8c94e6 100644 --- a/packages/simplex_app/lib/views/scan_invitation/scan_invitation_view.dart +++ b/packages/simplex_app/lib/views/scan_invitation/scan_invitation_view.dart @@ -28,10 +28,8 @@ class ScanInvitationView extends StatelessWidget { SizedBox(height: _size.height * 0.04), GestureDetector( onTap: () => _showConnection(context), - child: Image.asset( - 'assets/code.png', - height: _size.height * 0.3 - ), + child: + Image.asset('assets/code.png', height: _size.height * 0.3), ), SizedBox(height: _size.height * 0.04), const Text( diff --git a/packages/simplex_app/web/index.html b/packages/simplex_app/web/index.html index 3086becca..6ebe50af5 100644 --- a/packages/simplex_app/web/index.html +++ b/packages/simplex_app/web/index.html @@ -97,5 +97,6 @@ loadMainDartJs(); } +