Skip to content

Commit

Permalink
removed api key from version control
Browse files Browse the repository at this point in the history
  • Loading branch information
tb-rules10 committed Mar 15, 2023
1 parent 910cb3f commit 04b4129
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ migrate_working_dir/
.pub-cache/
.pub/
/build/
/lib/api_key.dart

# Symbolication related
app.*.symbols
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/RadioPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:demo_music/models/RadioModel.dart';
import '../models/RadioModel.dart';
import '../constants.dart';

class RadioHS extends StatefulWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/SearchPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:demo_music/models/API-Model.dart';
import 'package:demo_music/components/videoPlayer.dart';
import '../constants.dart';
import'../api_key.dart';

class SearchPage extends StatefulWidget {
const SearchPage({Key? key}) : super(key: key);
Expand All @@ -21,7 +22,6 @@ class _SearchPageState extends State<SearchPage> {
List<Video> videos = [];

searchYoutube(String query) async {
const apiKey = "AIzaSyCZB6jgkENt3fNy5PIY4LYGPJT5TfHn8XE";
var url = "https://www.googleapis.com/youtube/v3/search"
"?part=snippet"
"&maxResults=15"
Expand All @@ -31,7 +31,7 @@ class _SearchPageState extends State<SearchPage> {

var response = await http.get(Uri.parse(url));
var decodedJson = jsonDecode(response.body);

// print(url);
setState(() {
videos = decodedJson['items'].map<Video>((item) {
return Video.fromJson(item);
Expand Down
Empty file removed lib/pages/musicpage.dart
Empty file.

0 comments on commit 04b4129

Please sign in to comment.