小编Alp*_*hal的帖子

Flutter Android gradle 插件至版本 3.2.0 或更高版本

我已经更新了最新的 Android Gradle 版本,但在生成签名包时仍然显示错误。

\n

生成签名包需要您将 android gradle 插件更新到版本 3.2.0 或更高版本

\n

在此输入图像描述

\n

下面我分享一下版本详细信息。

\n
buildscript {\next.kotlin_version = \'1.6.21\'\nrepositories {\n    google()\n    mavenCentral()\n}\n\ndependencies {\n    classpath \'com.android.tools.build:gradle:7.0.4\'\n    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"\n    classpath \'com.google.gms:google-services:4.3.10\'\n}\n
Run Code Online (Sandbox Code Playgroud)\n

}

\n
distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4.2-all.zip\n
Run Code Online (Sandbox Code Playgroud)\n

安卓工作室版

\n

Android Studio 大黄蜂 | 2021.1.1 补丁 3\nBuild #AI-211.7628.21.2111.8309675,构建于 2022 年 3 月 16 日\n运行时版本:11.0.11+0-b60-7772763 aarch64\nVM:JetBrains sro 提供的 OpenJDK 64 位服务器虚拟机\nmacOS 11.4\nGC:G1 年轻代、G1 老一代\n内存:1280M\n核心:8\n注册表:external.system.auto.import.disabled=true\n非捆绑插件:Dart (211.7817)、org.jetbrains.kotlin ( 211-1.6.21-release-334-AS7442.40), io.flutter (66.0.1)

\n

颤动版本

\n

Flutter 2.10.0 \xe2\x80\xa2 通道稳定 \xe2\x80\xa2 https://github.com/flutter/flutter.git \nFramework \xe2\x80\xa2 修订版 5f105a6ca7(3 个月前) \xe2\x80 \xa2 …

android android-studio flutter flutter-android android-studio-bumblebee

10
推荐指数
1
解决办法
6141
查看次数

Getx 无法与 FutureBuilder 正常配合更新列表

我在我的项目中使用 Getx 控制器。我已经为 FutureBuilder 创建了用于显示列表的控制器,但未在 Future Function 上设置 .Obs。我正在分享代码。

class PPHomeController extends GetxController {
  Future<List<PPProductRenterModel>> listNearProduct;

  // i want to set .Obs end of the "listNearProduct" but it's not working because of Future.  

  FetchNearProductList({@required int price}) async {
      listNearProduct = CallGetNearProducts();// Http API Result
  }
} 



{
  PPHomeController _homeController = Get.put(PPHomeController());

  Widget mainProductListView() {
return FutureBuilder<List<PPProductRenterModel>>
  (builder: (context, AsyncSnapshot<List<PPProductRenterModel>> projectSnap){
    if(!projectSnap.hasData){
      if(projectSnap.connectionState == ConnectionState.waiting){
        return Container(
          child: Loading(),
        );
      }
    }
   
    return ListView.builder(
        itemCount: projectSnap.data.length,
        itemBuilder: (context, index) {

          PPProductRenterModel …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-futurebuilder flutter-getx

9
推荐指数
3
解决办法
2万
查看次数

Flutter 不支持的类文件主要版本 63 Android studio

更新 Android 版本和 flutter 版本后出现错误。现在我想添加“file_picker:^ 5.2.5”和“cached_network_image:^ 3.2.3”插件,因此出现“转换期间的常规错误:不支持的类文件主要版本63”错误。\n我检查了很多解决方案,但没有任何结果一位来帮助我。\n请帮助我解决此问题。

\n

Flutter 版本:- \nFlutter 3.3.3 \xe2\x80\xa2 通道稳定 \xe2\x80\xa2 https://github.com/flutter/flutter.git \nFramework \xe2\x80\xa2 修订版 18a827f393 (4 个月前) \xe2\x80\xa2 2022-09-28 10:03:14 -0700\nEngine \xe2\x80\xa2 修订版 5c984c26eb\n工具 \xe2\x80\xa2 Dart 2.18.2 \xe2\x80\xa2 DevTools 2.15。 0

\n

Android Studio 版本:- \nAndroid Studio 电鳗 | 2022.1.1\n构建 #AI-221.6008.13.2211.9477386,构建于 2023 年 1 月 11 日\n运行时版本:11.0.15+0-b2043.56-8887301 aarch64\nVM:JetBrains sro 提供的 OpenJDK 64 位服务器虚拟机\nmacOS 13.1\nGC: G1 年轻代、G1 老年代\n内存: 1280M\n内核: 8\n注册表:\nexternal.system.auto.import.disabled=true\nide.text.editor.with.preview.show.floating.toolbar =假

\n

非捆绑插件:\ncom.github.dhaval2404.material_icon_generator (1.3)\nDart (221.6091)\npl.pszklarska.pubversionchecker (1.3.5)\nio.flutter (71.2.4)

\n

在此输入图像描述

\n

android dart android-studio flutter

9
推荐指数
3
解决办法
1万
查看次数

在卡片小部件中使用材料3时白色无法正确显示

我在一个屏幕中使用了卡片小部件和容器,并在两者中设置了白色,它在容器中显示正确,但在卡片小部件中显示不正确。我已附上屏幕截图。在此屏幕截图中,代码和模拟器都进行了比较。

在此输入图像描述

提前谢谢您注意我已将应用程序用于浅色主题和深色主题。

ThemeData lightTheme(){
return ThemeData.light(useMaterial3: true).copyWith(
scaffoldBackgroundColor: Colors.white,
primaryColor: Colors.black,
primaryColorDark: Colors.white,

appBarTheme: AppBarTheme(
    backgroundColor: Colors.white,
  shadowColor: Colors.black,
  elevation: 15,
  foregroundColor: Colors.black,
  titleTextStyle:TextStyle().copyWith(color: Colors.black,fontFamily: EAFontName.Muli,fontWeight: EAFontWeight.muliMedium),
),
textTheme: TextTheme(
  titleSmall: TextStyle().copyWith(color: Colors.black,fontFamily: EAFontName.Muli,fontWeight: EAFontWeight.muliRegular,fontSize: EAFontSize.size10),
  titleMedium: TextStyle().copyWith(color: Colors.black,fontFamily: EAFontName.Muli,fontWeight: EAFontWeight.muliSemiBold,fontSize: EAFontSize.size12),
  titleLarge: TextStyle().copyWith(color: Colors.black,fontFamily: EAFontName.Muli,fontWeight: EAFontWeight.muliBold,fontSize: EAFontSize.size16),
),
  bottomNavigationBarTheme: BottomNavigationBarThemeData(
      backgroundColor: Colors.white54,
      selectedItemColor: Colors.black,
      unselectedItemColor: Colors.black54,
    elevation: 16,
  ),
  cardColor: Colors.white,
  cardTheme: CardTheme(
      color: Colors.white,
      shadowColor: Colors.black,
      elevation: 6,
    shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.circular(16),
       // side: BorderSide(color: Colors.black,width: 1)
    ), …
Run Code Online (Sandbox Code Playgroud)

dart material-design material-ui flutter

7
推荐指数
2
解决办法
3111
查看次数

如何使用 Firestore 在 Flutter 中搜索文本

我想通过查询使用 Cloud Firestore 实现搜索功能,但没有获得与获取数据相关的任何查询。我在谷歌上搜索了很多东西,但唯一的建议是首先从云 Firestore 获取所有数据,然后在本地搜索。我已经检查了查询内部的 where 条件,但没有找到任何条件,例如“开始于”等。

在此输入图像描述

我想通过名称参数进行搜索。

在此输入图像描述

dart firebase flutter google-cloud-firestore

4
推荐指数
2
解决办法
1万
查看次数