Мне нужно добавить меняющийся фон в мое приложение. Предложите мне решение
код:
Widget testBGCarousel = new Container(
child: new Carousel(
children: [
new AssetImage('images/a.jpg'),
new AssetImage('images/b.jpg'),
new AssetImage('images/sc.jpg'),
].map((bgImg) => new Image(image: bgImg, width: 1500.0, height: 1500.0,
fit: BoxFit.cover)).toList(),
displayDuration: const Duration(seconds: 4),
),
);
pubspec.yaml :
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0
share: ^0.5.3
flutter_webview_plugin: ^0.2.1+2
launch_review: ^1.0.1
carousel: ^0.1.0
ошибка:
Текущая версия Dart SDK - 2.1.0-dev.5.0.flutter-a2eb050044.
Поскольку для карусели 0.1.0 требуется версия SDK <2.0.0, а версии для карусели не соответствуют> 0.1.0 <0.2.0, карусель ^ 0.1.0 запрещена.
Итак, поскольку тест зависит от карусели ^ 0.1.0, решение проблемы не удалось. </p>
Паб получить не удалось (1)
код выхода 1