Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my work #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":["path_provider"]},{"name":"path_provider","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.14\\\\","dependencies":[]}],"android":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":["path_provider"]},{"name":"path_provider","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-1.6.14\\\\","dependencies":[]}],"macos":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":[]},{"name":"path_provider_macos","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-0.0.4+3\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-0.0.1+2\\\\","dependencies":[]}],"windows":[],"web":[{"name":"audioplayers","path":"D:\\\\application setups\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\audioplayers-0.16.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"audioplayers","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]}],"date_created":"2020-08-31 20:32:24.433437","version":"1.17.2"}
11 changes: 11 additions & 0 deletions ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\application setups\flutter"
export "FLUTTER_APPLICATION_PATH=M:\Android\projects\xylophone-flutter"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=D:\application setups\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
33 changes: 32 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:audioplayers/audio_cache.dart';

void main() => runApp(XylophoneApp());

class XylophoneApp extends StatelessWidget {
void playsound(int i) {
final player = AudioCache();
player.play('note$i.wav');
}

Expanded builtButton(int i, Color color) {
return Expanded(
child: FlatButton(
color: color,
onPressed: () {
playsound(i);
},
//child: ,
),
);
}

@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.black,
body: SafeArea(
child: Container(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
builtButton(1, Colors.red),
builtButton(2, Colors.pink),
builtButton(3, Colors.teal),
builtButton(4, Colors.yellow),
builtButton(5, Colors.green),
builtButton(6, Colors.blue),
builtButton(7, Colors.purple),
],
),
),
),
);
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies:
sdk: flutter

cupertino_icons: ^0.1.2
audioplayers: ^0.16.0

dev_dependencies:
flutter_test:
Expand Down