dart-lang / build

A build system for Dart written in Dart
https://pub.dev/packages/build
BSD 3-Clause "New" or "Revised" License
792 stars 207 forks source link

App doesnt work on real device!! #2591

Closed SenadK95 closed 4 years ago

SenadK95 commented 4 years ago

Hello everyone,

I have been working on an app wich has been working fine on the emulator. Today i tried to export my app and install the app on an android device. At first the app seemed to be fine. The homepage works correctly and the four buttons (RawMaterialButton) on the homepage also work. When i press one of the buttons it redirects to a different page wich also contains a button (floatactionbutton). But this button unfortunately doesnt do anything. I dont understand why, on the emulator everything is fine but on a real android device it doest work!

I tried replacing the button on the second page with the (working) button from the homepage. Also without result!

This is the working button code :

_new RawMaterialButton( onPressed: () { Navigator.push(context, MaterialPageRoute (builder: (context) => BookingForm()), ); }, child: new Icon( Icons.daterange, color: Colors.green[400], size: 70.0, ), shape: new CircleBorder(), elevation: 2.0, fillColor: Colors.white, padding: const EdgeInsets.all(15.0), )

This is the code from my second page:

FloatingActionButton.extended( onPressed: () { if(checkBookingID(reservationCodeInput.text)){ Navigator.push(context, MaterialPageRoute( builder: (context) => ChangeThemeOption()) ); }else{ showErrorDialog('Reserveringscode onbekend!', 'Uw reserveringscode is onbekend bij ons. Controleer uw reserveringscode in de mail!'); } }, label: Text( 'VOLGENDE STAP', style: TextStyle( fontSize: 15, fontFamily: 'Amaranth', fontWeight: FontWeight.bold, color: Colors.black, ), ), backgroundColor: Colors.green[400], )

After removing the if statements it worked and goes to a third page.

I hope someone can help me out!

natebosch commented 4 years ago

This repo is for build_runner and related packages, it is not involved in the build process for flutter on Android (though it is involved for flutter on the web). I can't transfer issues across orgs, and this issue doesn't seem very actionable on the flutter repo so I'll close for now.

The flutter issue templates point to some other resources for getting general help writing an app, I'd suggest following up with one of them first, and moving to the flutter issue tracker if you believe there is a bug in flutter.

If you are looking for support, please check out our documentation
or consider asking a question on Stack Overflow:
 * https://flutter.dev/
 * https://api.flutter.dev/
 * https://stackoverflow.com/questions/tagged/flutter?sort=frequent