Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ambient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniel Furaev
Ambient
Commits
b878a1e5
Commit
b878a1e5
authored
Jan 2, 2023
by
Madlen Ort
Browse files
Options
Downloads
Patches
Plain Diff
kleine Änderungen
parent
cb792ed7
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/CustomSearchDelegate.dart
+126
-4
126 additions, 4 deletions
lib/CustomSearchDelegate.dart
lib/classification.dart
+39
-3
39 additions, 3 deletions
lib/classification.dart
lib/registration.dart
+1
-0
1 addition, 0 deletions
lib/registration.dart
with
166 additions
and
7 deletions
lib/CustomSearchDelegate.dart
+
126
−
4
View file @
b878a1e5
...
...
@@ -3,10 +3,132 @@ import 'package:flutter/material.dart';
class
CustomSearchDelegate
extends
SearchDelegate
{
// Demo list to show querying
static
List
<
String
>
searchTerms
=
[
"Genre1"
,
"Genre1"
,
"Genre1"
,
"Genre1"
,
"acoustic"
,
"afrobeat"
,
"alt-rock"
,
"alternative"
,
"ambient"
,
"anime"
,
"black-metal"
,
"bluegrass"
,
"blues"
,
"bossanova"
,
"brazil"
,
"breakbeat"
,
"british"
,
"cantopop"
,
"chicago-house"
,
"children"
,
"chill"
,
"classical"
,
"club"
,
"comedy"
,
"country"
,
"dance"
,
"dancehall"
,
"death-metal"
,
"deep-house"
,
"detroit-techno"
,
"disco"
,
"disney"
,
"drum-and-bass"
,
"dub"
,
"dubstep"
,
"edm"
,
"electro"
,
"electronic"
,
"emo"
,
"folk"
,
"forro"
,
"french"
,
"funk"
,
"garage"
,
"german"
,
"gospel"
,
"goth"
,
"grindcore"
,
"groove"
,
"grunge"
,
"guitar"
,
"happy"
,
"hard-rock"
,
"hardcore"
,
"hardstyle"
,
"heavy-metal"
,
"hip-hop"
,
"holidays"
,
"honky-tonk"
,
"house"
,
"idm"
,
"indian"
,
"indie"
,
"indie-pop"
,
"industrial"
,
"iranian"
,
"j-dance"
,
"j-idol"
,
"j-pop"
,
"j-rock"
,
"jazz"
,
"k-pop"
,
"kids"
,
"latin"
,
"latino"
,
"malay"
,
"mandopop"
,
"metal"
,
"metal-misc"
,
"metalcore"
,
"minimal-techno"
,
"movies"
,
"mpb"
,
"new-age"
,
"new-release"
,
"opera"
,
"pagode"
,
"party"
,
"philippines-opm"
,
"piano"
,
"pop"
,
"pop-film"
,
"post-dubstep"
,
"power-pop"
,
"progressive-house"
,
"psych-rock"
,
"punk"
,
"punk-rock"
,
"r-n-b"
,
"rainy-day"
,
"reggae"
,
"reggaeton"
,
"road-trip"
,
"rock"
,
"rock-n-roll"
,
"rockabilly"
,
"romance"
,
"sad"
,
"salsa"
,
"samba"
,
"sertanejo"
,
"show-tunes"
,
"singer-songwriter"
,
"ska"
,
"sleep"
,
"songwriter"
,
"soul"
,
"soundtracks"
,
"spanish"
,
"study"
,
"summer"
,
"swedish"
,
"synth-pop"
,
"tango"
,
"techno"
,
"trance"
,
"trip-hop"
,
"turkish"
,
"work-out"
,
"world-music"
];
// first overwrite to
...
...
This diff is collapsed.
Click to expand it.
lib/classification.dart
+
39
−
3
View file @
b878a1e5
...
...
@@ -22,6 +22,9 @@ class _ClassificationPageState extends State<ClassificationPage> {
String
genreValue
=
''
;
bool
_redSelected
=
false
;
bool
_orangeSelected
=
false
;
bool
_yellowSelected
=
false
;
bool
_greenSelected
=
false
;
void
_redContainerWasTapped
()
{
setState
(()
=
>
_redSelected
=
!
_redSelected
);
...
...
@@ -29,13 +32,22 @@ class _ClassificationPageState extends State<ClassificationPage> {
_ambientBackgroundColor
=
Colors
.
red
;
if
(
!
_redSelected
){
_ambientBackgroundColor
=
Colors
.
grey
.
withOpacity
(
0.5
);}
}
bool
_orangeSelected
=
false
;
void
_orangeContainerWasTapped
()
{
setState
(()
=
>
_orangeSelected
=
!
_orangeSelected
);
_ambientBackgroundColor
=
Colors
.
orange
;
if
(
!
_orangeSelected
){
_ambientBackgroundColor
=
Colors
.
grey
.
withOpacity
(
0.5
);}
}
void
_yellowContainerWasTapped
()
{
setState
(()
=
>
_yellowSelected
=
!
_yellowSelected
);
_ambientBackgroundColor
=
Colors
.
yellow
;
if
(
!
_yellowSelected
){
_ambientBackgroundColor
=
Colors
.
grey
.
withOpacity
(
0.5
);}
}
void
_greenContainerWasTapped
()
{
setState
(()
=
>
_greenSelected
=
!
_greenSelected
);
_ambientBackgroundColor
=
Colors
.
green
;
if
(
!
_greenSelected
){
_ambientBackgroundColor
=
Colors
.
grey
.
withOpacity
(
0.5
);}
}
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -85,6 +97,28 @@ class _ClassificationPageState extends State<ClassificationPage> {
)
,),
SizedBox
(
height:
20
,),
GestureDetector
(
onTap:
_yellowContainerWasTapped
,
child:
Container
(
child:
_yellowSelected
?
selectedColor
(
"Yellow"
,
Colors
.
yellow
,
"Yellow1"
,
"Yellow1"
,
"Yellow1"
)
:
noSelection
(
"Yellow"
)
)
,),
SizedBox
(
height:
20
,),
GestureDetector
(
onTap:
_greenContainerWasTapped
,
child:
Container
(
child:
_greenSelected
?
selectedColor
(
"Green"
,
Colors
.
green
,
"Green1"
,
"Green2"
,
"Green3"
)
:
noSelection
(
"Green"
)
)
,),
SizedBox
(
height:
20
,),
ElevatedButton
(
style:
ButtonStyle
(
backgroundColor:
MaterialStatePropertyAll
<
Color
>(
Colors
.
white
.
withOpacity
(
0.9
))),
child:
const
Text
(
...
...
@@ -287,8 +321,10 @@ class _ClassificationPageState extends State<ClassificationPage> {
String
id
=
'
${FirebaseAuth.instance.currentUser?.uid.toString()}
_genres'
;
var
document
=
FirebaseFirestore
.
instance
.
collection
(
'classification'
)
.
doc
(
id
);
var
snapshot
=
await
document
.
get
();
//snapshot.sata()
return
snapshot
.
get
(
colorText
);
//snapshot.data();
//if(snapshot.data()?.containsKey(colorText)){
return
await
snapshot
.
get
(
colorText
);
}
closeAll
(){
...
...
This diff is collapsed.
Click to expand it.
lib/registration.dart
+
1
−
0
View file @
b878a1e5
...
...
@@ -142,6 +142,7 @@ class _RegistrationPage extends State<RegistrationPage> {
'user'
:
_usernameTextController
.
text
,
'Red'
:
'Not Selected'
,
'Orange'
:
'Not Selected'
,
'Yellow'
:
'Not Selected'
,
};
await
user
.
set
(
json
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment