title: Flutter: after release app can't sign in and floatingActionButton don't work
body: <p>My app something like Udemy app, it's developed by Flutter</p>
  <p>I was published iOS release to App store and working well
  but in Android studio doing strange situation...</p>
  <p>When I run app on emulator or real device connected to Android studio every thing working well, but when run it with command</p>
  <pre><code>Flutter run --release
  </code></pre>
  <p>or build the apk file or abb file
  the raisedbutton with Whatsapp icon shown in image below doesn't work</p>
  <p><a href="https://i.stack.imgur.com/bDagh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bDagh.jpg" alt="app First screen with raisedbutton" /></a></p>
  <p><strong>The big problem in signing page [code shown below] when user try to signin I get this HTTP try get error with message</strong></p>
  <blockquote>
  <p>MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences</p>
  </blockquote>
  <p><strong>Note: I use word (errrrrrrrrrrrrrooooor) in code shown below to show where error message show</strong></p>
  <p>after search about this error I get that we get this error when no previous values in shared preferences, but in app first use before signing I don't use shared preferences</p>
  <p>So, I don't understand why this happen, specially in apk release and working well in test mode on emulator or real device</p>
  <p><strong>Note: I was add Internet permissions in manifest file</strong></p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
  </code></pre>
  <p><strong>So, I need help about that</strong></p>
  <pre><code>import 'dart:async';
  import 'dart:convert';
  import 'dart:io';
  import 'package:connect/models/app_logo.dart';
  import 'package:connect/widgets/app_bar_two.dart';
  import 'package:cached_network_image/cached_network_image.dart';
  import 'package:device_info_plus/device_info_plus.dart';
  import 'package:flutter/services.dart';
  import 'package:http/http.dart' as http;
  import '../models/common_functions.dart';
  import 'package:flutter/material.dart';
  import 'package:provider/provider.dart';
  import '../providers/auth.dart';
  import '../models/http_exception.dart';
  import '../constants.dart';
  
  enum AuthMode { Signup, Login }
  
  class AuthScreen extends StatefulWidget {
    static const routeName = '/auth';
  
    @override
    _AuthScreenState createState() =&gt; _AuthScreenState();
  }
  
  class _AuthScreenState extends State&lt;AuthScreen&gt; {
  
    final _controller = StreamController&lt;AppLogo&gt;();
  
    final searchController = TextEditingController();
  
    fetchMyLogo() async {
      var url = BASE_URL +'/api/app_logo';
      try {
    final response = await http.get(url);
    print(response.body);
    if (response.statusCode == 200) {
      var logo = AppLogo.fromJson(jsonDecode(response.body));
      _controller.add(logo);
    }
    // print(extractedData);
  } catch (error) {
    throw (error);
  }
    }
  
    void initState() {
      super.initState();
      this.fetchMyLogo();
    }
  
    @override
    Widget build(BuildContext context) {
      final deviceSize = MediaQuery.of(context).size;
      // final transformConfig = Matrix4.rotationZ(-8 * pi / 180);
      // transformConfig.translate(-10.0);
      return Scaffold(
        appBar: CustomAppBarTwo(),
        // resizeToAvoidBottomInset: false,
        body: Stack(
      children: &lt;Widget&gt;[
        SingleChildScrollView(
          child: Container(
            height: deviceSize.height,
            width: deviceSize.width,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: &lt;Widget&gt;[
                Container(
                  child: StreamBuilder&lt;AppLogo&gt;(
                    stream: _controller.stream,
                    builder: (context, snapshot) {
                      if (snapshot.connectionState ==
                          ConnectionState.waiting) {
                        return Container();
                      } else {
                        if (snapshot.error != null) {
                          return Text(&quot;Error Occured&quot;);
                        } else {
                          // saveImageUrlToSharedPref(snapshot.data.darkLogo);
                          return CachedNetworkImage(
                            imageUrl: snapshot.data.favicon,
                            fit: BoxFit.contain,
                            height: 33,
                          );
                        }
                      }
                    },
                  ),
                ),
                Container(
                  margin: EdgeInsets.only(bottom: 20.0),
                  padding:
                  EdgeInsets.symmetric(vertical: 4.0, horizontal: 94.0),
                  child: Text(
                    'Login',
                    style: TextStyle(
                      color: kTextColor,
                      fontSize: 30,
                      fontWeight: FontWeight.normal,
                    ),
                  ),
                ),
                Flexible(
                  flex: deviceSize.width &gt; 600 ? 2 : 1,
                  child: AuthCard(),
                ),
              ],
            ),
          ),
        ),
      ],
    ),
  );
    }
  }
  
  class AuthCard extends StatefulWidget {
    const AuthCard({
      Key key,
    }) : super(key: key);
  
    @override
    _AuthCardState createState() =&gt; _AuthCardState();
  }
  
  class _AuthCardState extends State&lt;AuthCard&gt; {
    final GlobalKey&lt;FormState&gt; _formKey = GlobalKey();
  
    Map&lt;String, String&gt; _authData = {
      'email': '',
      'password': '',
    };
    var _isLoading = false;
    final _passwordController = TextEditingController();
  
    Future&lt;void&gt; _submit() async {
  if (!_formKey.currentState.validate()) {
    // Invalid!
    return;
  }
  _formKey.currentState.save();
  
  setState(() {
    _isLoading = true;
  });
  try {
    // Log user in
    await Provider.of&lt;Auth&gt;(context, listen: false).login(
      _authData['email'],
      _authData['password'],
    );
  
    String deviceName;
    String deviceVersion;
    String identifier;
  
    final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
    try {
      if (Platform.isAndroid) {
        var build = await deviceInfoPlugin.androidInfo;
        deviceName = build.model;
        deviceVersion = build.version.toString();
        identifier = build.androidId;  //UUID for Android
      } else if (Platform.isIOS) {
        var data = await deviceInfoPlugin.iosInfo;
        deviceName = data.name;
        deviceVersion = data.systemVersion;
        identifier = data.identifierForVendor;  //UUID for iOS
      }
    } on PlatformException {
      print('Failed to get platform version');
    }
  
    try{
      var response = await http.post(
          Uri.parse(&quot;https://connect-elearning.com/newVersion/APIs/checkIDntfr.php&quot;),
          body: {
            'IdentifierPst': identifier,
            'userNoPst': _authData['email'],
          });
  
      Map&lt;String,dynamic&gt; data = jsonDecode(response.body);
      String svdIdentifier = data[&quot;svdIdentifier&quot;];
      String svdUserID = data[&quot;svdUserID&quot;];
      String realUserID = data[&quot;RealUserID&quot;];
  
      if(svdIdentifier != &quot;notFound&quot;){
        if(svdIdentifier == identifier &amp;&amp; svdUserID == realUserID){
          Navigator.pushNamedAndRemoveUntil(context, '/home', (r) =&gt; false);
          //CommonFunctions.showSuccessToast('Login Successful');
          CommonFunctions.showSuccessToast('Login Successful');
        } else if(svdIdentifier != identifier || svdUserID != realUserID){
          // SharedPreferences preferences = await SharedPreferences.getInstance();
          // await preferences.clear();
  
          showDialog(
              context: context,
              builder: (_) {
                return AlertDialog(
                  title: Text('Your account is registered for another device, please contact technical support.'),
                  //title: Text('Your ${svdIdentifier} ${svdUserID} ${realUserID}'),
                  actions: [
                    FlatButton(
                      onPressed: () =&gt; Navigator.pop(context, true), // passing true
                      child: Text('Exit'),
                    ),
                  ],
                );
              }).then((exit) {
            if (exit == null) {SystemNavigator.pop();}
  
            if (exit) {
              SystemNavigator.pop();
            } else {
              SystemNavigator.pop();
            }
          });
  
        }
      } else {
  
        try{
          var response = await http.post(
              Uri.parse(&quot;https://connect-elearning.com/newVersion/APIs/userIDntfrSv.php&quot;),
              body: {
                'userNoPst': _authData['email'],
                'dvNamePst': deviceName,
                //'dvOSPst': deviceVersion,
                'dvIdntPst': identifier,
              });
  
        } catch (e){
          print(e);
        }
  
        Navigator.pushNamedAndRemoveUntil(context, '/home', (r) =&gt; false);
        CommonFunctions.showSuccessToast('Login Successful');
  
      }
  
  
    } catch (e) {
      //print(&quot;note that ${e}&quot;);
    }
  
  
  } on HttpException catch (error) {
    var errorMsg = 'Wrong data, you can contact customers services';
    CommonFunctions.showErrorDialog(errorMsg, context);
  } catch (error) {
    //const errorMsg = 'Could not authenticate!, may you need to contact to customers services via whats-app: +201033040777';
    //String errorMsg = 'Done!${error}, Go to My courses page';
  </code></pre>
  <h1><strong>Error message shown in the next line</strong></h1>
  <pre><code>  print(&quot;errrrrrrrrrrrrrooooor ${error}&quot;);
  
  
  }
  setState(() {
    _isLoading = false;
  });
    }
  
    @override
    Widget build(BuildContext context) {
      final deviceSize = MediaQuery.of(context).size;
      return Container(
    height: 360,
    constraints: BoxConstraints(minHeight: 260),
    width: deviceSize.width * 0.8,
    padding: EdgeInsets.all(16.0),
    child: Form(
      key: _formKey,
      child: SingleChildScrollView(
        child: Column(
          children: &lt;Widget&gt;[
            TextFormField(
              decoration: InputDecoration(
                //labelText: 'Email Address',
                labelText: 'Mobile',
                prefixIcon: Icon(
                  //Icons.mail_outline,
                  Icons.phone_android,
                  color: Colors.grey,
                ), // myIcon is a 48px-wide widget.
              ),
              //keyboardType: TextInputType.emailAddress,
              keyboardType: TextInputType.phone,
              validator: (input) =&gt; input.length &lt; 11
                  ? &quot;Enter valid mobile number!&quot;
                  : null,
              /*validator: (value) {
                if (value.isEmpty || !value.contains('@')) {
                  return 'Invalid email!';
                }
              },*/
              onSaved: (value) {
                _authData['email'] = value;
              },
            ),
            TextFormField(
              decoration: InputDecoration(
                labelText: 'Password',
                prefixIcon: Icon(
                  Icons.vpn_key,
                  color: Colors.grey,
                ),
              ),
              obscureText: true,
              controller: _passwordController,
              validator: (value) {
                if (value.isEmpty || value.length &lt; 4) {
                  return 'Password is too short!';
                }
              },
              onSaved: (value) {
                _authData['password'] = value;
              },
            ),
            SizedBox(
              height: 20,
            ),
            if (_isLoading)
              CircularProgressIndicator()
            else
              ButtonTheme(
                minWidth: deviceSize.width * 0.8,
                child: RaisedButton(
                  child: Text(
                    'Sign In',
                    style: TextStyle(fontWeight: FontWeight.bold),
                  ),
                  onPressed: _submit,
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(7.0),
                    side: BorderSide(color: kBlueColor),
                  ),
                  splashColor: Colors.blueAccent,
                  padding:
                  EdgeInsets.symmetric(horizontal: 50.0, vertical: 20),
                  color: kBlueColor,
                  textColor: Colors.white,
                ),
              ),
            SizedBox(
              height: 20,
            ),
            /*    ButtonTheme(
              minWidth: deviceSize.width * 0.8,
              child: RaisedButton(
                child: Text(
                  'Create Account',
                  style: TextStyle(fontWeight: FontWeight.bold),
                ),
                onPressed: () {
                  Navigator.of(context).pushNamed(SignUpScreen.routeName);
                },
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(7.0),
                  side: BorderSide(color: kGreyColor),
                ),
                splashColor: Colors.blueAccent,
                padding: EdgeInsets.symmetric(horizontal: 50.0, vertical: 20),
                color: kGreyColor,
                textColor: kTextColor,
              ),
            ),*/
          ],
        ),
      ),
    ),
  );
    }
  }
  </code></pre>
  <h1>Edit:</h1>
  <p>When I try to run app with command</p>
  <pre><code>flutter run --release
  </code></pre>
  <p>I get this 2 errors in Terminal</p>
  <blockquote>
  <p>E/flutter (18074): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
  E/flutter (18074):
  E/flutter (18074): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permi
  ssions/methods)</p>
  </blockquote>
  <p>and I try to run</p>
  <pre><code>flutter clean
  flutter pub get
  </code></pre>
  <p>... etc, and nothing new</p>
  <h1>Update</h1>
  <p>when I updated gradle to the last version, app working well except few users still get same error
  I don't understand why!</p>