Skip to content

Commit 4676016

Browse files
committed
fx5 - Vinyl clean ups
1 parent f7eac2d commit 4676016

File tree

11 files changed

+43
-559
lines changed

11 files changed

+43
-559
lines changed

lib/circles_selector/CirclesHomeWidget.dart

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,6 @@ class _PannableCircleGridState extends State<PannableCircleGrid>
9898
);
9999
},
100100
),
101-
// CustomPaint( //Enable for debugging
102-
// painter: DebugPainter(
103-
// tapPosition: _tapPosition,
104-
// gridOffset: _offset,
105-
// circleSize: _circleSize,
106-
// spacing: _spacing,
107-
// columns: _columns,
108-
// ),
109-
// ),
110101
],
111102
),
112103
),
@@ -156,72 +147,6 @@ class _PannableCircleGridState extends State<PannableCircleGrid>
156147
),
157148
);
158149
}
159-
// @override
160-
// Widget build(BuildContext context) {
161-
// return GestureDetector(
162-
// onPanUpdate: _handlePan,
163-
// onPanEnd: _handlePanEnd,
164-
// child: Container(
165-
// // Added Container for background color
166-
// color: Colors.black,
167-
// child: ClipRect(
168-
// child: Stack(
169-
// children: [
170-
// AnimatedBuilder(
171-
// animation:
172-
// Listenable.merge(_animationControllers.values.toList()),
173-
// builder: (context, child) {
174-
// return CustomPaint(
175-
// painter: CircleGridPainter(
176-
// offset: _offset,
177-
// circleSize: _circleSize,
178-
// selectedCircleMultiplier: _selectedCircleMultiplier,
179-
// spacing: _spacing,
180-
// selectedIndex: _selectedIndex,
181-
// columns: _columns,
182-
// animationControllers: _animationControllers,
183-
// ),
184-
// child: GestureDetector(
185-
// onTapUp: _handleTap,
186-
// ),
187-
// );
188-
189-
// // Stack(
190-
// // children: [
191-
192-
// // ],
193-
// // );
194-
// },
195-
// ),
196-
// CustomPaint(
197-
// painter: DebugPainter(
198-
// tapPosition: _tapPosition,
199-
// gridOffset: _offset,
200-
// circleSize: _circleSize,
201-
// spacing: _spacing,
202-
// columns: _columns,
203-
// ),
204-
// ),
205-
// Positioned(
206-
// bottom: 0,
207-
// child: Container(
208-
// height: 100,
209-
// width: double.infinity,
210-
// decoration: BoxDecoration(
211-
// gradient: LinearGradient(
212-
// colors: [Colors.blue, Colors.green],
213-
// begin: Alignment.centerLeft,
214-
// end: Alignment.centerRight,
215-
// ),
216-
// ),
217-
// ),
218-
// )
219-
// ],
220-
// ),
221-
// ),
222-
// ),
223-
// );
224-
// }
225150

226151
void _handlePan(DragUpdateDetails details) {
227152
setState(() {

lib/main.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class AnimationShowcaseApp extends StatelessWidget {
1313
@override
1414
Widget build(BuildContext context) {
1515
return MaterialApp(
16+
debugShowCheckedModeBanner: false,
1617
title: 'fx-widget Showcase',
1718
theme: ThemeData.dark().copyWith(
1819
primaryColor: const Color(0xFF1E1E1E),
@@ -57,7 +58,10 @@ class HomeScreen extends StatelessWidget {
5758
appBarColor: Colors.black,
5859
),
5960
AnimationExample(
60-
title: '3D Vinyl', builder: (context) => const VinylHomeWidget()),
61+
title: '3D Vinyl',
62+
builder: (context) => const VinylHomeWidget(),
63+
appBarColor: Colors.black,
64+
),
6165
];
6266

6367
HomeScreen({super.key});
@@ -90,8 +94,8 @@ class HomeScreen extends StatelessWidget {
9094
onTap: () => Navigator.push(
9195
context,
9296
MaterialPageRoute(
93-
builder: (context) =>
94-
DetailScreen(example: examples[index]),
97+
builder: (context) => DetailScreen(
98+
key: UniqueKey(), example: examples[index]),
9599
),
96100
),
97101
child: Column(

lib/vinyl/card_stack_4_angles.dart

Lines changed: 0 additions & 77 deletions
This file was deleted.

lib/vinyl/easing/super_duper_ease_in.dart

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/vinyl/camera_simulation.dart renamed to lib/vinyl/examples/tools/camera_simulation.dart

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:math' as math;
33
import 'dart:convert';
44
import 'package:flutter/services.dart';
55

6+
//make this into web tools for working quickly with flutter animation with transform
67
class CameraSimulation extends StatefulWidget {
78
@override
89
_CameraSimulationState createState() => _CameraSimulationState();
@@ -233,97 +234,3 @@ class _CameraSimulationState extends State<CameraSimulation> {
233234
);
234235
}
235236
}
236-
// import 'package:flutter/material.dart';
237-
// import 'dart:math' as math;
238-
239-
// class CameraSimulation extends StatefulWidget {
240-
// @override
241-
// _CameraSimulationState createState() => _CameraSimulationState();
242-
// }
243-
244-
// class _CameraSimulationState extends State<CameraSimulation> {
245-
// double _rotateX = 0;
246-
// double _rotateY = 0;
247-
// double _translateZ = 0;
248-
// double _perspective = 0;
249-
250-
// @override
251-
// Widget build(BuildContext context) {
252-
// return Column(
253-
// children: [
254-
// Container(
255-
// height: 300,
256-
// child: Transform(
257-
// transform: Matrix4.identity()
258-
// ..setEntry(3, 2, 0.001) // perspective
259-
// ..rotateX(_rotateX)
260-
// ..rotateY(_rotateY)
261-
// ..translate(0.0, 0.0, _translateZ),
262-
// alignment: FractionalOffset.center,
263-
// child: _build3DScene(),
264-
// ),
265-
// ),
266-
// _buildControls(),
267-
// ],
268-
// );
269-
// }
270-
271-
// Widget _build3DScene() {
272-
// return Stack(
273-
// children: [
274-
// // Back plane (blue)
275-
// Transform(
276-
// transform: Matrix4.translationValues(0, 0, -100),
277-
// child: Container(color: Colors.blue, width: 200, height: 200),
278-
// ),
279-
// // Left plane (red)
280-
// Transform(
281-
// transform: Matrix4.identity()
282-
// ..translate(-100.0, 0.0, -50)
283-
// ..rotateY(math.pi / 2),
284-
// child: Container(color: Colors.red, width: 200, height: 200),
285-
// ),
286-
// // Right plane (green)
287-
// Transform(
288-
// transform: Matrix4.identity()
289-
// ..translate(100.0, 0.0, -50)
290-
// ..rotateY(-math.pi / 2),
291-
// child: Container(color: Colors.green, width: 200, height: 200),
292-
// ),
293-
// // Front object (yellow cube)
294-
// Transform(
295-
// transform: Matrix4.translationValues(0, 0, 50),
296-
// child: Container(color: Colors.yellow, width: 50, height: 50),
297-
// ),
298-
// ],
299-
// );
300-
// }
301-
302-
// Widget _buildControls() {
303-
// return Column(
304-
// children: [
305-
// Slider(
306-
// value: _rotateX,
307-
// min: -math.pi / 4,
308-
// max: math.pi / 4,
309-
// onChanged: (value) => setState(() => _rotateX = value),
310-
// label: 'Rotate X: ${_rotateX.toStringAsFixed(2)}',
311-
// ),
312-
// Slider(
313-
// value: _rotateY,
314-
// min: -math.pi / 4,
315-
// max: math.pi / 4,
316-
// onChanged: (value) => setState(() => _rotateY = value),
317-
// label: 'Rotate Y: ${_rotateY.toStringAsFixed(2)}',
318-
// ),
319-
// Slider(
320-
// value: _translateZ,
321-
// min: -200,
322-
// max: 200,
323-
// onChanged: (value) => setState(() => _translateZ = value),
324-
// label: 'Translate Z: ${_translateZ.toStringAsFixed(2)}',
325-
// ),
326-
// ],
327-
// );
328-
// }
329-
// }

0 commit comments

Comments
 (0)