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

[Question] Integration into existing app #23

Closed
scheung38 opened this issue Jul 21, 2021 · 7 comments
Closed

[Question] Integration into existing app #23

scheung38 opened this issue Jul 21, 2021 · 7 comments

Comments

@scheung38
Copy link

scheung38 commented Jul 21, 2021

Why in the example main.dart when right clicked inside VSCode and Goto Definition:

import 'package:record/record.dart'

it is directed to:

Screenshot 2021-07-21 at 19 42 08

and clicked on

export 'package:record/src/record.dart';

takes us to:

Screenshot 2021-07-21 at 19 43 07

But in my own local project doing the same clicking on

import 'package:record/record.dart';

$HOME/.pub-cache/hosted/pub.dartlang.org/record-2.1.1/lib/record.dart

Screenshot 2021-07-21 at 19 44 29

Is this because my path_provider or something is not setup correctly as i expect both the example and in my local project to point to the same Record class. thanks.

environment:
sdk: ">=2.7.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

just_audio:
path_provider:

record:
path: ../

@llfbandit
Copy link
Owner

This is because you're not comparing same package versions. Record latest version is 3. You're on 2.1.1 in your local project.

@scheung38
Copy link
Author

@llfbandit thanks is my setup correct?

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  algolia: ^0.1.4+3

  assets_audio_player: 
  auto_size_text:
  built_collection: ^5.0.0
  built_value: ^8.0.6
  cached_network_image:  
  cloud_firestore: 
  equatable: ^1.2.5
  firebase_auth:  
  firebase_core: 
  font_awesome_flutter:
  geolocator:
  google_fonts: ^1.1.2
  google_sign_in: ^4.0.16
  intl:
  json_path: ^0.2.1
  json_serializable: ^3.5.1
  page_transition:
  rxdart: 
  sign_in_with_apple: ^2.5.4
  timeago:
  url_launcher:


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.0
  flutter_native_splash: 

  just_audio:
  path_provider: 

  record_platform_interface: 

  record:
    path: ../ 

    



dev_dependencies:
  build_runner: ^1.11.5
  built_value_generator: ^8.0.4

  flutter_test:
    sdk: flutter


flutter_native_splash:
  color: "#b496d6"
  image: assets/images/snippets_800.png
  android: true
  ios: true

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/images/
    - assets/videos/
    - assets/audios/

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages
  plugin:
    platforms:
      android:
        package: com.llfbandit.record
        pluginClass: RecordPlugin
      ios:
        pluginClass: RecordPlugin

Didn't want to upgrade to 3 as a lot of the other packages are not yet null-safety, so this means until the others are migrated we wont be able to use 3?

@scheung38
Copy link
Author

scheung38 commented Jul 22, 2021

@llfbandit

is this needed in pubspec.yaml?


 record:
    path: ../

updated to 3.0.0 but all the other

firebase_auth: ^0.20.1
firebase_core: ^0.7.0
cloud_firestore

are breaking

@llfbandit
Copy link
Owner

llfbandit commented Jul 22, 2021

Please follow only this: https://pub.dev/packages/record/install. You can also stick in version 2.x if needed.
If other dependencies are breaking, this is not related to this package.

@scheung38
Copy link
Author

scheung38 commented Jul 22, 2021

flutter pub add record will also add record_platform_interface under the hood?

I manually added lib/record.dart in local project:

export 'package:record/src/record.dart';
export 'package:record_platform_interface/record_platform_interface.dart';

was this needed?

@llfbandit
Copy link
Owner

Yes. You can use version 3 if you want but you need to update your environment constraints

@scheung38
Copy link
Author

scheung38 commented Jul 22, 2021

@llfbandit Trying to find version record: ^2.1.1

Repository owner locked and limited conversation to collaborators Jul 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants