I don't beleieve the library saves the settings for show/hide.
When the user runs one of the actions that shows/hides the button you have to set the
.show value in the db eg.:
Lua Code:
TestMMBicon:Hide("TestMiniMapButton")
self.db.show = false
TestMMBicon:Show("TestMiniMapButton")
self.db.show = true
When you create the MM Button you have to set its visible state to whatever was last saved in the db
Lua Code:
local TestMiniButton = LibStub("AceAddon-3.0"):NewAddon("TestMiniMapButton", "AceConsole-3.0")
TestMiniButton:SetShown(self.db.show) -- Assuming self.db has been initalised at this stage
You could use the buttons OnShow/OnHide scripts to do the setting of the db.show value.