[nativeapi_flutter]: does not reexport `Size` type

未關閉 適合新手
#21 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
70/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
dart, flutter
領域
api, desktop

研究方向

報告指出 nativeapi 套件中的 lib/src/foundation/geometry.dart 是其 Size 型別的定義位置,修正方式是讓它可以透過公開入口 package:nativeapi/nativeapi.dart 存取。首先檢查這個 barrel 函式庫匯出了哪些檔案,以及幾何檔案是否在其中。用一個小型 Flutter 應用程式重現問題:匯入 nativeapi 的 Size,並同時匯入 Flutter 的 Size。當匯入能夠編譯,且不再出現型別不符時,即視為完成。

由索引模型根據 Issue 內容生成。

描述

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;

主要語言
TypeScript
星號
170
分支
15
平均合併
58 分鐘
30 天內合併 PR
1

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。