Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows vs linux path separators.... #1

Open
mistyn8 opened this issue May 7, 2020 · 2 comments
Open

windows vs linux path separators.... #1

mistyn8 opened this issue May 7, 2020 · 2 comments

Comments

@mistyn8
Copy link

mistyn8 commented May 7, 2020

Getting an error on Windows...

digging into it
final String fileName = fileSystemEntity.path.split("/").last; isn't gettting the filename as

fileSystemEntity.path returns something like

android/app/src/main/kotlin/com/example/stacked_ehq\MainActivity.kt

quick and dirty fix..
final String fileName = fileSystemEntity.path.replaceAll('\\', '/').split("/").last;

[√] Flutter (Channel dev, 1.18.0-10.0.pre, on Microsoft Windows [Version 10.0.18363.778], locale en-GB)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 3.6)
[√] VS Code (version 1.44.2)
[√] Connected device (3 available)

@mistyn8
Copy link
Author

mistyn8 commented May 7, 2020

Also didn't rename the *.iml file prob the same issue?

Also find and replace revealed a few other places the "flutter create" added old names that aren't picked up?

image

hope this helps?

@Syed-Waleed-Shah
Copy link

This package is what you need 🔥 Too much flexibilities

https://pub.dev/packages/rename_app

Rename App The only flutter package which changes app name for all platforms with sound null safety! If you want to autmatically change your flutter app name with a single command then you are at the right pacakge. This package gives you too many flexibilities through too many variants of its commands. Read the details below to know in more details

✊ Dont forget to star the github repo if you found this package useful 😇

Features 🔥

✅ Remane Android Project
✅ Remane IOS Project
✅ Remane WEB Project
✅ Remane Windows Project

How To Rename ? 🛠

1) ADD THE PACKAGE TO DEPENDENCIES IN pubspec.yaml

flutter pub add rename_app


OR


dependencies: rename_app: ^latest_version


2) PROVIDE THE APP NAME

You can provide app name in the following ways

  • Same name for all apps

flutter pub run rename_app:main all="My App Name"

  • Seperate name for specified platform(s) and same for all others

flutter pub run rename_app:main android="Anroid Name" ios="IOS Name" others="Others Name"

  • Seperate name for each platform

flutter pub run rename_app:main android="Android Name" ios="IOS Name" web="Web Name" mac="Mac Name" windows="Windows Name"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants