This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo.controller; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.*; | |
import org.springframework.web.multipart.MultipartFile; | |
import org.springframework.web.bind.annotation.CrossOrigin; | |
import java.io.File; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Créer une fonction pour ajouter des données | |
Recevoir une collection et des données | |
Appeler Firestore pour ajouter ces données dans la collection | |
Si l'ajout réussit | |
Afficher un message de succès | |
Sinon | |
Afficher un message d'erreur | |
*/ | |
Future<void> addData(String collection, Map<String, dynamic> data) async { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import '../helpers/api_helper.dart'; | |
import '../models/post.dart'; | |
import '../widgets/app_drawer.dart'; | |
class AddPostScreen extends StatefulWidget { | |
@override | |
_AddPostScreenState createState() => _AddPostScreenState(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
import 'dart:convert'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'database_helper.dart'; | |
import 'training.dart'; | |
class AddOrEditTrainingPage extends StatefulWidget { | |
final Training? training; | |
AddOrEditTrainingPage({this.training}); | |
@override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:sqflite/sqflite.dart'; | |
import 'package:path/path.dart'; | |
import '../models/project.dart'; | |
import '../models/training.dart'; | |
class DatabaseHelper { | |
static final DatabaseHelper _instance = DatabaseHelper._internal(); | |
static Database? _database; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Project { | |
final int? id; // ID unique généré automatiquement | |
final String title; | |
final String description; | |
final String duration; | |
final String link; | |
Project({ | |
this.id, | |
required this.title, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'ListView & Cards Example', | |
theme: ThemeData(primarySwatch: Colors.blue), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: RegistrationForm(), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MaterialApp( | |
title: 'Navigation Flutter', | |
theme: ThemeData( | |
primarySwatch: Colors.green, | |
), | |
home: FirstRoute(), | |
)); |
NewerOlder