clean code
This commit is contained in:
parent
fb8b564456
commit
d6279fa2e8
@ -1,56 +0,0 @@
|
|||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:manager_api/api.dart';
|
|
||||||
import 'package:mymuseum_visitapp/Components/ShowImagePopup.dart';
|
|
||||||
import 'package:mymuseum_visitapp/Models/resourceModel.dart';
|
|
||||||
import 'package:mymuseum_visitapp/app_context.dart';
|
|
||||||
|
|
||||||
class BuilderImageSlider extends StatelessWidget {
|
|
||||||
const BuilderImageSlider(
|
|
||||||
{Key? key,
|
|
||||||
required this.appContext,
|
|
||||||
required this.currentIndex,
|
|
||||||
required this.contentsDTO,
|
|
||||||
required this.size,
|
|
||||||
required this.i}
|
|
||||||
) : super(key: key);
|
|
||||||
|
|
||||||
final AppContext appContext;
|
|
||||||
final int currentIndex;
|
|
||||||
final List<ContentDTO?> contentsDTO;
|
|
||||||
final Size size;
|
|
||||||
final ResourceModel i;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
/*return Builder(
|
|
||||||
builder: (BuildContext context) {*/
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
showImagePopup(contentsDTO[currentIndex-1]!, i, appContext, context, size);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
//color: Colors.red,
|
|
||||||
//height: widget.height * 1,
|
|
||||||
//width: size.width * 0.95,
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(15.0),
|
|
||||||
child: Image.memory(base64Decode(i.path!))/*PhotoView(
|
|
||||||
imageProvider: Image.memory(base64Decode(i!.data!)).image,
|
|
||||||
minScale: PhotoViewComputedScale.contained * 0.8,
|
|
||||||
maxScale: PhotoViewComputedScale.contained * 3.0,
|
|
||||||
backgroundDecoration: BoxDecoration(
|
|
||||||
color: Colors.transparent,
|
|
||||||
/*shape: BoxShape.rectangle,
|
|
||||||
borderRadius: BorderRadius.circular(15.0),*/
|
|
||||||
),
|
|
||||||
)*/,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
//},
|
|
||||||
//);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -2,7 +2,6 @@ import 'dart:convert';
|
|||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:mymuseum_visitapp/Components/Carousel/carousel_slider.dart' as cs;
|
|
||||||
//import 'package:confetti/confetti.dart';
|
//import 'package:confetti/confetti.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_api/api.dart';
|
import 'package:manager_api/api.dart';
|
||||||
@ -45,7 +44,6 @@ class _QuizzPageState extends State<QuizzPage> {
|
|||||||
QuizzDTO? quizzDTO;
|
QuizzDTO? quizzDTO;
|
||||||
List<QuestionSubDTO> _questionsSubDTO = <QuestionSubDTO>[];
|
List<QuestionSubDTO> _questionsSubDTO = <QuestionSubDTO>[];
|
||||||
//ConfettiController? _controllerCenter;
|
//ConfettiController? _controllerCenter;
|
||||||
CarouselController? sliderController;
|
|
||||||
int currentIndex = 1;
|
int currentIndex = 1;
|
||||||
bool showResult = false;
|
bool showResult = false;
|
||||||
bool showResponses = false;
|
bool showResponses = false;
|
||||||
@ -60,8 +58,6 @@ class _QuizzPageState extends State<QuizzPage> {
|
|||||||
//_controllerCenter = ConfettiController(duration: const Duration(seconds: 10));
|
//_controllerCenter = ConfettiController(duration: const Duration(seconds: 10));
|
||||||
//_controllerCenter!.play();
|
//_controllerCenter!.play();
|
||||||
|
|
||||||
sliderController = CarouselController();
|
|
||||||
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user