tomgilder / flutter_apple_sign_in

Flutter Plugin for Sign In with Apple
MIT License
160 stars 70 forks source link

Update ButtonStyle enum #60

Open vinothvino42 opened 4 years ago

vinothvino42 commented 4 years ago

ButtonStyle is already defined in the flutter/src/material/button_style.dart, so need to change the name of the ButtonStyle enum from apple_sign_in/apple_sign_in_button to any other.

The name 'ButtonStyle' is defined in the libraries 'package:apple_sign_in/apple_sign_in_button.dart (via package:apple_sign_in/apple_sign_in.dart)' and 'package:flutter/src/material/button_style.dart (via package:flutter/material.dart)'.
Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports.

Flutter Doctor Summary

flutter_sample git:(develop) ✗ flutter doctor -v
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-IN)
    • Flutter version 1.22.0 at /Users/vinothvino/Developer/flutter
    • Framework revision d408d302e2 (2 days ago), 2020-09-29 11:49:17 -0700
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/vinothvino/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/vinothvino/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.15.0

[✓] Connected device (1 available)            
    • iPhone 11 (mobile) • C7A5417C-90EC-4B43-9822-083A2D821BCE • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

• No issues found!
bravsoul commented 4 years ago

This is a dup of https://github.com/tomgilder/flutter_apple_sign_in/issues/55

Sunsiha commented 4 years ago

@bravsoul @vinothvino42 @tomgilder Any update with this?

vinothvino42 commented 4 years ago

@bravsoul @vinothvino42 @tomgilder Any update with this?

No, Better you modify the name of ButtonStyle enumeration in the apple_sign_in/apple_sign_in_button.dart to AppleButtonStyle.

Sunsiha commented 4 years ago

@bravsoul @vinothvino42 @tomgilder Hey I tried like this for me it's working, import header like this; import 'package:apple_sign_in/apple_sign_in.dart' as apple;

then;

AppleSignInButton(
                                    style: apple.ButtonStyle.black,
                                    type: ButtonType.continueButton,
                                    onPressed: () {

                                    },
                                  )