KEMBAR78
Internship Report With Code | PDF | Computer Programming | Software Development
0% found this document useful (0 votes)
36 views9 pages

Internship Report With Code

Uploaded by

ska6201392581
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views9 pages

Internship Report With Code

Uploaded by

ska6201392581
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Internship Report

Mobile Application Development with Flutter at CodSoft

Table of Contents

1. Declaration
2. Certificate
3. Abstract
4. Acknowledgment
5. Introduction
6. About Flutter
7. Internship Objectives
8. Tasks Undertaken
- Task 1: To-Do Application
- Task 2: Quote of the Day Application
9. Code and Flowcharts
- Flowchart for To-Do Application
- Flowchart for Quote of the Day Application
- Code Explanation
10. Learning Outcomes
11. Applications of Learning
12. Conclusion
13. References

Task 1: To-Do Application

import 'package:flutter/material.dart';

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

class ToDoApp extends StatelessWidget {


@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: ToDoListScreen(),
);
}
}

class ToDoListScreen extends StatefulWidget {


@override
_ToDoListScreenState createState() => _ToDoListScreenState();
}

class _ToDoListScreenState extends State<ToDoListScreen> {


List<Map<String, dynamic>> tasks = [];

final TextEditingController taskController = TextEditingController();

void addTask(String task) {


setState(() {
tasks.add({'task': task, 'completed': false});
});
taskController.clear();
}

void toggleTaskCompletion(int index) {


setState(() {
tasks[index]['completed'] = !tasks[index]['completed'];
});
}

void deleteTask(int index) {


setState(() {
tasks.removeAt(index);
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('To-Do List')),
body: tasks.isEmpty
? Center(child: Text('No tasks added yet!'))
: ListView.builder(
itemCount: tasks.length,
itemBuilder: (context, index) {
return ListTile(
title: Text(
tasks[index]['task'],
style: TextStyle(
decoration: tasks[index]['completed']
? TextDecoration.lineThrough
: TextDecoration.none,
),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
icon: Icon(
tasks[index]['completed']
? Icons.check_box
: Icons.check_box_outline_blank,
),
onPressed: () => toggleTaskCompletion(index),
),
IconButton(
icon: Icon(Icons.delete),
onPressed: () => deleteTask(index),
),
],
),
);
},
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text('Add Task'),
content: TextField(
controller: taskController,
decoration: InputDecoration(hintText: 'Enter task'),
),
actions: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text('Cancel'),
),
TextButton(
onPressed: () {
addTask(taskController.text);
Navigator.of(context).pop();
},
child: Text('Add'),
),
],
),
);
},
),
);
}
}

Task 2: Quote of the Day Application

import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';

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

class QuoteApp extends StatelessWidget {


@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: QuoteScreen(),
);
}
}
class QuoteScreen extends StatefulWidget {
@override
_QuoteScreenState createState() => _QuoteScreenState();
}

class _QuoteScreenState extends State<QuoteScreen> {


String quote = "Click 'Get Quote' to see an inspiring quote!";
String author = "";

Future<void> fetchQuote() async {


try {
final response = await http.get(Uri.parse('https://api.quotable.io/random'));
if (response.statusCode == 200) {
final data = json.decode(response.body);
setState(() {
quote = data['content'];
author = data['author'];
});
} else {
throw Exception('Failed to load quote');
}
} catch (e) {
setState(() {
quote = "Error fetching quote. Please try again.";
author = "";
});
}
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Quote of the Day')),
body: Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'"$quote"',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 20, fontStyle: FontStyle.italic),
),
SizedBox(height: 10),
Text(
author.isNotEmpty ? '- $author' : '',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
SizedBox(height: 20),
ElevatedButton(
onPressed: fetchQuote,
child: Text('Get Quote'),
),
],
),
),
),
);
}
}

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.
Detailed explanations, flowcharts, and technical analysis are provided to ensure
comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.
Detailed explanations, flowcharts, and technical analysis are provided to ensure
comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.
Detailed explanations, flowcharts, and technical analysis are provided to ensure
comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

Detailed explanations, flowcharts, and technical analysis are provided to ensure


comprehensive documentation of all activities undertaken.

You might also like