plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

Package updates version only by Runner.RC on Windows Platform

Open ricardo-gsilva opened this issue 4 years ago • 3 comments

System info

Issue occurs on: Windows Plugin name: package_info_plus Plugin version: 1.3.0

Steps to Reproduce

I used the code itself available in pubdev to test the package and found this situation. I believe it's a bug, if it isn't, please disregard it.

In Windows the package only accepts version change if the change is made in Runner.rc. ...

It's the first view I use this package for Windows. Maybe the operation is changed by Runner.rc and I'm wrong.

But whether the change should also be accepted by build.gradle or properties we have a point to be corrected.

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'PackageInfo Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: MyHomePage(title: 'PackageInfo example app'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, this.title}) : super(key: key);

  final String? title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  PackageInfo _packageInfo = PackageInfo(
    appName: 'Unknown',
    packageName: 'Unknown',
    version: 'Unknown',
    buildNumber: 'Unknown',
    buildSignature: 'Unknown',
  );

  @override
  void initState() {
    super.initState();
    _initPackageInfo();
  }

  Future<void> _initPackageInfo() async {
    final info = await PackageInfo.fromPlatform();
    setState(() {
      _packageInfo = info;
    });
  }

  Widget _infoTile(String title, String subtitle) {
    return ListTile(
      title: Text(title),
      subtitle: Text(subtitle.isEmpty ? 'Not set' : subtitle),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title!),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          _infoTile('App name', _packageInfo.appName),
          _infoTile('Package name', _packageInfo.packageName),
          _infoTile('App version', _packageInfo.version),
          _infoTile('Build number', _packageInfo.buildNumber),
          _infoTile('Build signature', _packageInfo.buildSignature),
        ],
      ),
    );
  }
}
Logs
Flutter doctor output

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [versão 10.0.19042.1526], locale pt-BR) • Flutter version 2.8.1 at C:\Users\Ricardo Gomes\Documents\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 77d935af4d (9 weeks ago), 2021-12-16 08:37:33 -0800 • Engine revision 890a5fca2e • Dart version 2.15.1

[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at C:\Users\Ricardo Gomes\AppData\Local\Android\sdk • Platform android-32, build-tools 32.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted.

[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.8) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.11.32002.261 • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2020.3) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[√] VS Code (version 1.64.2) • VS Code at C:\Users\Ricardo Gomes\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.34.0

[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [versão 10.0.19042.1526] • Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.99 • Edge (web) • edge • web-javascript • Microsoft Edge 98.0.1108.50

ricardo-gsilva avatar Feb 14 '22 18:02 ricardo-gsilva

Duplicate of https://github.com/fluttercommunity/plus_plugins/issues/343; see my comment there.

stuartmorgan-g avatar Apr 11 '22 16:04 stuartmorgan-g

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Jun 11 '22 00:06 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Sep 19 '22 00:09 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

github-actions[bot] avatar Dec 29 '22 00:12 github-actions[bot]