{"id":15497909,"url":"https://github.com/rodydavis/flutter_pptx","last_synced_at":"2025-08-21T17:26:01.230Z","repository":{"id":149901744,"uuid":"617799308","full_name":"rodydavis/flutter_pptx","owner":"rodydavis","description":"Create PowerPoint (pptx) presentations in Flutter and Dart","archived":false,"fork":false,"pushed_at":"2023-10-14T19:26:08.000Z","size":5695,"stargazers_count":51,"open_issues_count":4,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T17:30:36.245Z","etag":null,"topics":["dart","flutter","mustache","powerpoint","pptx","xml"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodydavis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-23T06:09:36.000Z","updated_at":"2024-12-16T16:53:00.000Z","dependencies_parsed_at":"2024-11-08T19:01:05.293Z","dependency_job_id":"5494a7a4-1f6a-44e4-aee0-70af864a2fab","html_url":"https://github.com/rodydavis/flutter_pptx","commit_stats":{"total_commits":67,"total_committers":3,"mean_commits":"22.333333333333332","dds":0.07462686567164178,"last_synced_commit":"47bb4fc1a17bfc738738413c7fb392fa97e6535f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodydavis%2Fflutter_pptx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodydavis%2Fflutter_pptx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodydavis%2Fflutter_pptx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodydavis%2Fflutter_pptx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodydavis","download_url":"https://codeload.github.com/rodydavis/flutter_pptx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250330573,"owners_count":21412998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","mustache","powerpoint","pptx","xml"],"created_at":"2024-10-02T08:41:10.305Z","updated_at":"2025-04-22T21:45:43.725Z","avatar_url":"https://github.com/rodydavis.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter PPTX\n\nA Flutter package for creating PowerPoint presentations.\n\n| Package | Pub |\n|---------|-----|\n| [dart_pptx](/packages/dart_pptx) | [![pub package](https://img.shields.io/pub/v/dart_pptx.svg)](https://pub.dev/packages/dart_pptx) |\n| [flutter_pptx](/packages/flutter_pptx) | [![pub package](https://img.shields.io/pub/v/flutter_pptx.svg)](https://pub.dev/packages/flutter_pptx) |\n\n## Example\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_pptx/flutter_pptx.dart';\n\nimport 'dart:typed_data';\n\nimport 'package:share_plus/share_plus.dart';\n\nFuture\u003cvoid\u003e downloadFile(String name, Uint8List bytes) async {\n  Share.shareXFiles(\n    [\n      XFile.fromData(\n        bytes,\n        name: 'presentation.pptx',\n        mimeType:\n            'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n        lastModified: DateTime.now(),\n        length: bytes.length,\n      )\n    ],\n    text: 'Presentation',\n  );\n}\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Flutter Demo',\n      theme: ThemeData.light(useMaterial3: true).copyWith(\n        colorScheme: ColorScheme.fromSeed(\n          seedColor: Colors.blue,\n        ),\n      ),\n      home: const MyHomePage(title: 'Presentation Example'),\n    );\n  }\n}\n\nclass MyHomePage extends StatefulWidget {\n  const MyHomePage({super.key, required this.title});\n\n  final String title;\n\n  @override\n  State\u003cMyHomePage\u003e createState() =\u003e _MyHomePageState();\n}\n\nclass _MyHomePageState extends State\u003cMyHomePage\u003e {\n  Future\u003cFlutterPowerPoint\u003e createPresentation() async {\n    final pres = FlutterPowerPoint();\n\n    pres.addTitleSlide(\n      title: 'Slide one'.toTextValue(),\n    );\n\n    pres.addTitleAndPhotoSlide(\n      title: 'Slide two'.toTextValue(),\n      image: ImageReference(\n        path: 'assets/images/sample_gif.gif',\n        name: 'Sample Gif',\n      ),\n    );\n\n    pres.addTitleAndPhotoAltSlide(\n      title: 'Slide three'.toTextValue(),\n      image: ImageReference(\n        path: 'assets/images/sample_jpg.jpg',\n        name: 'Sample Jpg',\n      ),\n    );\n\n    pres\n        .addTitleAndBulletsSlide(\n          title: 'Slide three'.toTextValue(),\n          bullets: [\n            'Bullet 1',\n            'Bullet 2',\n            'Bullet 3',\n            'Bullet 4',\n          ].map((e) =\u003e e.toTextValue()).toList(),\n        )\n        .speakerNotes = TextValue.uniform('This is a note!');\n\n    pres\n        .addBulletsSlide(\n          bullets: [\n            'Bullet 1',\n            'Bullet 2',\n            'Bullet 3',\n            'Bullet 4',\n          ].map((e) =\u003e e.toTextValue()).toList(),\n        )\n        .speakerNotes = TextValue.singleLine([\n      TextItem('This '),\n      TextItem('is ', isBold: true),\n      TextItem('a ', isUnderline: true),\n      TextItem('note!'),\n    ]);\n\n    pres.addTitleBulletsAndPhotoSlide(\n      title: 'Slide five'.toTextValue(),\n      image: ImageReference(\n        path: 'assets/images/sample_jpg.jpg',\n        name: 'Sample Jpg',\n      ),\n      bullets: [\n        'Bullet 1',\n        'Bullet 2',\n        'Bullet 3',\n        'Bullet 4',\n      ].map((e) =\u003e e.toTextValue()).toList(),\n    );\n\n    pres\n        .addSectionSlide(\n          section: 'Section 1'.toTextValue(),\n        )\n        .speakerNotes = TextValue.multiLine([\n      TextValueLine(values: [\n        TextItem('This '),\n        TextItem('is ', isBold: true),\n        TextItem('a ', isUnderline: true),\n        TextItem('note 1!'),\n      ]),\n      TextValueLine(values: [\n        TextItem('This '),\n        TextItem('is ', isBold: true),\n        TextItem('a ', isUnderline: true),\n        TextItem('note 2!'),\n      ]),\n    ]);\n\n    pres.addTitleOnlySlide(\n      title: 'Title 1'.toTextValue(),\n      subtitle: 'Subtitle 1'.toTextValue(),\n    );\n\n    pres.addAgendaSlide(\n      title: 'Title 1'.toTextValue(),\n      subtitle: 'Subtitle 1'.toTextValue(),\n      topics: 'Topics 1'.toTextValue(),\n    );\n\n    pres.addStatementSlide(\n      statement: 'Statement 1'.toTextValue(),\n    );\n\n    pres.addBigFactSlide(\n      fact: 'Title 1'.toTextLine(),\n      information: 'Fact 1'.toTextValue(),\n    );\n\n    pres.addQuoteSlide(\n      quote: 'Quote 1'.toTextLine(),\n      attribution: 'Attribution 1'.toTextValue(),\n    );\n\n    pres.addPhoto3UpSlide(\n      image1: ImageReference(\n        path: 'assets/images/sample_gif.gif',\n        name: 'Sample Gif',\n      ),\n      image2: ImageReference(\n        path: 'assets/images/sample_jpg.jpg',\n        name: 'Sample Jpg',\n      ),\n      image3: ImageReference(\n        path: 'assets/images/sample_png.png',\n        name: 'Sample Png',\n      ),\n    );\n\n    pres.addPhotoSlide(\n      image: ImageReference(\n        path: 'assets/images/sample_gif.gif',\n        name: 'Sample Gif',\n      ),\n    );\n\n    pres.addBlankSlide();\n\n    pres.addBlankSlide().background.color = '000000';\n\n    pres.addBlankSlide().background.image = ImageReference(\n      path: 'assets/images/sample_gif.gif',\n      name: 'Sample Gif',\n    );\n\n    await pres.addWidgetSlide(\n      (size) =\u003e Center(\n        child: Container(\n          padding: const EdgeInsets.all(30.0),\n          decoration: BoxDecoration(\n            border: Border.all(color: Colors.blueAccent, width: 5.0),\n            color: Colors.redAccent,\n          ),\n          child: const Text(\"This is an invisible widget\"),\n        ),\n      ),\n    );\n\n    pres.showSlideNumbers = true;\n\n    return pres;\n  }\n\n  Future\u003cvoid\u003e downloadPresentation(FlutterPowerPoint pres) async {\n    final bytes = await pres.save();\n    if (bytes == null) return;\n    downloadFile('presentation.pptx', bytes);\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(\n        title: Text(widget.title),\n      ),\n      body: Center(\n        child: ElevatedButton(\n          onPressed: () async {\n            final pres = await createPresentation();\n            await downloadPresentation(pres);\n          },\n          child: const Text('Download Presentation'),\n        ),\n      ),\n    );\n  }\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodydavis%2Fflutter_pptx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodydavis%2Fflutter_pptx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodydavis%2Fflutter_pptx/lists"}