Closed Danjavia closed 4 years ago
Hi I have a Problem here. I make the import of library and resolve the dependence in main dart file but return the next error
Target of URI doesn't exist....
This is my code and pubspec command for getting packages not retrieve the package. Some idea?
import 'package:app/src/utils/helpers.dart'; import 'package:app/src/User/ui/screens/Sign/sign.dart'; import 'package:flutter/material.dart'; import 'package:intro_views_flutter/Models/page_view_model.dart'; import 'package:intro_views_flutter/intro_views_flutter.dart'; import 'package:intro_slider/intro_slider.dart'; import 'package:intro_slider/slider_object.dart'; class IntroView extends StatefulWidget { @override _IntroViewState createState() => _IntroViewState(); } class _IntroViewState extends State<IntroView> { List<Slide> slides = new List(); @override void initState() { // TODO: implement initState super.initState(); slides.add( new Slide( title: "ERASER", description: "Allow miles wound place the leave had. To sitting subject no improve studied limited", pathImage: "images/photo_eraser.png", backgroundColor: Color(0xfff5a623), ), ); slides.add( new Slide( title: "PENCIL", description: "Ye indulgence unreserved connection alteration appearance", pathImage: "images/photo_pencil.png", backgroundColor: Color(0xff203152), ), ); slides.add( new Slide( title: "RULER", description: "Much evil soon high in hope do view. Out may few northward believing attempted. Yet timed being songs marry one defer men our. Although finished blessing do of", pathImage: "images/photo_ruler.png", backgroundColor: Color(0xff9932CC), ), ); } final pages = [ PageViewModel( pageColor: const Color.fromRGBO(118, 18, 224, 0.95), // iconImageAssetPath: 'assets/air-hostess.png', bubble: Image.asset('assets/images/005-shield.png'), body: Text( 'En caso de un accidente de tránsito, StronGo notificará a tus contactos sobre tu estado y ubicación de manera inmediata.', style: TextStyle(fontFamily: 'Ubuntu', fontSize: 18.0), ), title: Container( margin: EdgeInsets.only(top: 30.0), child: Text( 'Añade contactos de emergencia', style: TextStyle(fontFamily: 'Ubuntu', fontSize: 30.0,), textAlign: TextAlign.center, ), ), textStyle: TextStyle(fontFamily: 'Ubuntu', color: Colors.white), mainImage: Image.asset( 'assets/images/onboarding_img_1.png', height: 305.0, width: 305.0, alignment: Alignment.center, ) ), PageViewModel( pageColor: const Color.fromRGBO(18, 97, 224, 0.95), // iconImageAssetPath: 'assets/air-hostess.png', bubble: Image.asset('assets/images/006-helmet.png'), body: Text( 'En caso de accidente de tránsito, alerta de manera inmediata a todos los miembros de tu grupo sin presionar un botón.', style: TextStyle(fontFamily: 'Ubuntu', fontSize: 18.0), ), title: Container( margin: EdgeInsets.only(top: 30.0), child: Text( 'Tu bienestar, nuestra prioridad', style: TextStyle(fontFamily: 'Ubuntu', fontSize: 30.0), textAlign: TextAlign.center, ), ), textStyle: TextStyle(fontFamily: 'Ubuntu', color: Colors.white), mainImage: Image.asset( 'assets/images/onboarding_img_2.png', height: 305.0, width: 305.0, alignment: Alignment.center, )), PageViewModel( pageColor: const Color.fromRGBO(231, 176, 0, 0.75), // iconImageAssetPath: 'assets/air-hostess.png', bubble: Image.asset('assets/images/008-discount.png'), body: Text( 'Captura promociones en los comercios de tu ciudad mientras conduces. Es como capturar pokemones, solo que mejor', style: TextStyle(fontFamily: 'Ubuntu', fontSize: 18.0), ), title: Container( margin: EdgeInsets.only(top: 30.0), child: Text( 'Strongo es mejor con amigos', style: TextStyle(fontFamily: 'Ubuntu', fontSize: 30.0), textAlign: TextAlign.center, ), ), textStyle: TextStyle(fontFamily: 'Ubuntu', color: Colors.white), mainImage: Image.asset( 'assets/images/onboarding_img_3.png', height: 305.0, width: 305.0, alignment: Alignment.center, ) ), ]; @override Widget build(BuildContext context) { return new IntroSlider( slides: this.slides, onDonePress: this.onDonePress, ); return IntroViewsFlutter( pages, onTapDoneButton: () { setStorage('_intro', 'wasViewed'); Navigator.push( context, MaterialPageRoute( builder: (context) => SignScreen(), ), //MaterialPageRoute ); }, doneText: Text('Listo!'), skipText: Text('Saltar'), pageButtonTextStyles: TextStyle( color: Colors.white, fontSize: 18.0, ), ); } }
Can you help me please?
Hi, please change your import
import 'package:intro_slider/slider_object.dart';
To
import 'package:intro_slider/slide_object.dart';
Hi I have a Problem here. I make the import of library and resolve the dependence in main dart file but return the next error
Target of URI doesn't exist....
This is my code and pubspec command for getting packages not retrieve the package. Some idea?
Can you help me please?