我创建了一个Xamarin Forms应用程序。并在带有名为“ MyLabel”的标签的新页面内。在我的页面后面的代码中
private void SetUpUI()
{
#if __IOS__
this.MyLabel.BackgroundColor = Color.Navy;
#endif
}
Run Code Online (Sandbox Code Playgroud)
在我的iOS项目选项中,我可以__IOS__在“编译器”选项卡中看到符号。(请看截图)
当我在iOS中运行时,它不会使标签变成蓝色:

但是,如果我删除#if __IOS__块,它将使标签变为蓝色:

因此,似乎条件编译不起作用。我在Mac上。因此无法在Visual Studio上进行测试。卡住了很长时间,但无法弄清我错过了什么。
我的滑块从一个值跳到另一个值。如何使其在值之间移动或使其在 Flutter 中更加平滑?
Column(
children: <Widget>[
RangeSlider(
min: 1,
max: 40,
divisions: 4,
onChanged: onChange,
values: RangeValues((startValue ?? 1).toDouble(), (endValue ?? 40).toDouble()),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text('Beginner', style: Theme.of(context).textTheme.body2),
Text('Ameateur', style: Theme.of(context).textTheme.body2),
Text('Intermediate', style: Theme.of(context).textTheme.body2),
Text('Advanced', style: Theme.of(context).textTheme.body2),
Text('Professional', style: Theme.of(context).textTheme.body2),
],
),
],
);
Run Code Online (Sandbox Code Playgroud) 当两个或多个开发人员在一个团队中工作时,如果已安装的 APK 是由其他开发人员生成的,则他们无法覆盖。这是确切的场景:
谁能告诉为什么会发生此错误是否有任何笔记本电脑级别的依赖性?