Closed pixnbit closed 4 years ago
IOS and Android folders have nothing to do with this package because is not a native package it is just flutter widget if you want to use it add slider_button
to your dependencies
in pubspec.yaml
:
dependencies:
flutter:
sdk: flutter
slider_button
import it and use in your widget:
import 'package:slider_button/slider_button.dart';
Center(child: SliderButton(
action: () {
///Do something here
Navigator.of(context).pop();
},
label: Text(
"Slide to cancel Event",
style: TextStyle(
color: Color(0xff4a4a4a), fontWeight:
FontWeight.w500, fontSize: 17),
),
icon: Text(
"x",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w400,
fontSize: 44,
),
),
));
It was not about using it. I can use it fine without any issue. I forked the project and wanted to make changes in the source code for more customization. Somehow I can't get the project to compile in Android studio, the complaint by the IDE was missing Android/iOS project. I did "flutter create ." also. I ended up just copy the code into a new project to make changes.
@pixnbit It's because this is not a project. It's package. It's not for using as a standalone app. You need to create/edit example project to change package.
My title might be misleading. I did not expect it to be a standalone app. I needed to customize the source code. But the project fresh cloned won't compile. Other several "package" library projects I forked work right out of the box, meaning it's not standalone, it's a package, it has an "example" folder.
Something might be missing that didn't get checked in for the project, but the /lib source code is all fine. I'm closing this ticket now. It's no longer an issue for me. But who would expect it to be a standalone app 🤦♂️
The iOS and Android folders are missing in your checked-in source code. I can't load your project. I've tried "flutter create ." it won't work, it requires some copy paste work now.