[nativeapi_flutter]: does not reexport `Size` type

Open Beginner friendly
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
dart, flutter
Domain
api, desktop

Research direction

The report names lib/src/foundation/geometry.dart in the nativeapi package as where its Size type is defined, and the fix is to make it reachable from the public package:nativeapi/nativeapi.dart entry point. Start by checking which files that barrel library exports and whether the geometry file is among them. Reproduce with a small Flutter app that imports Size from nativeapi next to Flutter's Size. Done when the import compiles and the type mismatch no longer appears.

Written by the indexing model from the issue text.

Description

Which leads to:

A value of type 'Size (where Size is defined in /home/xxx/develop/flutter/bin/cache/pkg/sky_engine/lib/ui/geometry.dart)' can't be assigned to a variable of type 'Size (where Size is defined in /home/xxx/.pub-cache/hosted/pub.dev/nativeapi-0.5.7/lib/src/foundation/geometry.dart)'. (Documentation)

Fix:
add nativeapi as dependency
Add the following import:
import 'package:nativeapi/nativeapi.dart' show Size;

Dominant language
TypeScript
Stars
170
Forks
15
Avg merge
58m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libnativeapi/nativeapi

All issues in libnativeapi/nativeapi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.