summaryrefslogtreecommitdiff
path: root/lib/widgets/arrows.dart
blob: 162f0f3f4e134259e330caae69423bdfce785aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import 'package:flutter/material.dart';
import 'package:sense_the_rhythm/models/note.dart';
import 'package:sense_the_rhythm/widgets/arrow.dart';

class Arrows extends StatelessWidget {
  final List<Note> notes;

  const Arrows({super.key, required this.notes});

  @override
  Widget build(BuildContext context) {
    return Stack(
        children: notes.map((note) {
      double position =
          note.position * 10000; //  * 20 * MediaQuery.of(context).size.height;

      return Arrow(
        position: position,
        direction: note.direction,
      );
    }).toList());
  }
}