Eine Fork von story mit einer Instagram-Story-ähnlichen Benutzeroberfläche, reichhaltigen Animationen und noch mehr Anpassungsmöglichkeiten als das ursprüngliche Paket.
Aus öffentlichen Paketdaten erstellte Orientierung.
Story_time ist ein Flutter-Paket, das eine Instagram-artige Geschichten-Oberfläche mit fließenden Animationen und erweitertem Anpassungspotenzial im Vergleich zu seinem Original bietet. Es ermöglicht Entwicklern die Erstellung interaktiver Vollbild-Geschichten-Erlebnisse mit Swipen-Navigation, Timer und Unterstützung für reichhaltige Medien über mehrere Plattformen hinweg. Das Paket unterstützt Android, iOS, Web, macOS, Windows und Linux und ist daher ideal für plattformübergreifende Anwendungen, die ansprechende, geschichtsartige Inhaltsdarstellungen erfordern. Mit umfangreichen Anpassungsmöglichkeiten lässt sich Aussehen und Verhalten feinjustieren, um unterschiedliche Designanforderungen zu erfüllen.
Anwendungsfälle
interaktive Geschichten-Feeds
Social-Media-App-Funktionen
Benutzer-Onboarding-Tutorials
Inhalts-Highlight-Reels
Engagierende Marketingkampagnen
Hauptmerkmale
Reichhaltige Animationen
Swipenavigation
Plattformübergreifende Unterstützung
Hoch anpassbare Benutzeroberfläche
Geschichte Fortschritt basierend auf Timer
medienreiche Geschichtskarten
Geeignet für
Mobile und Web-Anwendungen
Soziale Netzwerk-Funktionen
Onboarding-Erlebnisse
Marketing und Werbung
Kreative Content-Plattformen
Hinweise
Erfordert sorgfältige Behandlung der Zustandsverwaltung
Kann die Leistung bei schweren Medien beeinträchtigen
Benutzerdefinierte Stile erfordern Erfahrung mit Flutter-Widgets
Beschränkte Dokumentation über die grundlegende Einrichtung hinaus
Nicht für sehr lange Geschichtensequenzen optimiert
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
story_time
A fork of story. Instagram stories like UI with rich animations and even more customizability than the original package.
Usage
StoryPageView needs at least three arguments: itemBuilder, pageLength, and storyLength.
/// Minimum example to explain the usage.returnScaffold(
body: StoryPageView(
itemBuilder: (context, pageIndex, storyIndex) {
returnCenter(
child: Text("Index of PageView: $pageIndex Index of story on each page: $storyIndex"),
);
},
storyLength: (pageIndex) {
return3;
},
pageLength: 4,
);
itemBuilder is necessary to build the content of story. It is called with index of pageView and index of the story on the page.
storyLength decides the length of story for each page. The example above always returns 3, but it should depend on the argument pageIndex
pageLength is just the length of StoryPageView
The example above just shows 12 stories by 4 pages, which is not practical.
This one is the proper usage, extracted from example.
gestureItemBuilder is the builder for the widgets which needs gesture actions.
In this case, IconButton to close the page is in the callback.
You CANNOT place the gesture widgets in itemBuilder because it is covered and disabled by default story gestures.
onPageLimitReached is called when the very last story is finished.
It is recommended to use data model with two layers. In this case, UserModel which has the list of StoryModel
/// Example Data ModelclassUserModel{
UserModel(this.stories, this.userName, this.imageUrl);
finalList<StoryModel> stories;
finalString userName;
finalString imageUrl;
}
classStoryModel{
StoryModel(this.imageUrl);
finalString imageUrl;
}
Controlling animations
My point of forking the original package was to add the ability to
control the duration of a specific index of a story. Look at the example to see how to use it if you are interested.
Callbacks for pausing and unpausing stories
The package also supports adding callbacks for pausing and unpausing a story to the StoryPageView widget. See the example project for more
details.
Callbacks for moving to a different page
The package also supports adding callbacks for going a page backwards and for going a page forwards to the StoryPageView widget. See the example project for more details.
Callbacks for moving to a different story
The package also supports adding a callback for whenever the story index changes to the StoryPageView widget. See the example project for more details.
Tips
This package is still under development. If you have any requests or questions, please ask on github