It's a secure flutter website coded with love for prep students to enagage them into activities during the pandemic.
- Download Flutter Web.
- Create a New Project on Firebase.
- Create a web project on Firebase and exchange your firebaseConfig with the one in [user -> web -> index.html].
- Create secretKey.dart in [user -> util]
class SecretKey{
static String secretKey = 'your_secret_key';
}
- Create secretKey.dart in [web directory].
function get_config(type) {
if (type === 'test') {
return {
apiKey: "apiKey",
authDomain: "authDomain",
databaseURL: "databaseURL",
projectId: "projectId",
storageBucket: "storageBucket",
messagingSenderId: "messagingSenderId",
appId: "appId"
};
} else {
return {
apiKey: "apiKey",
authDomain: "authDomain",
databaseURL: "databaseURL",
projectId: "projectId",
storageBucket: "storageBucket",
messagingSenderId: "messagingSenderId",
appId: "appId"
};
}
}
- Call get_confige method in [web -> index.html].
<script>
var firebaseConfig = get_config('test');
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
</script>